/* SideQuestParamedic — design system Itération 1 : sobre, lisible, « logiciel métier » */
/* Thème canonique : CLAIR, quelle que soit la préférence système (aucun mode sombre automatique : voir docs/SIDEQUEST_VISUAL_DIRECTION_V1.md).
   Les anciens blocs « @media (prefers-color-scheme: dark) » ont été retirés ; color-scheme: light garde aussi les champs natifs clairs. */
:root {
  color-scheme: light;
  /* Neutres */
  --bg-app: #F3F1EC; --bg-page: #F8F7F3; --bg-surface: #FCFBF8; --bg-surface-soft: #EFEEE9;
  --text-primary: #202427; --text-secondary: #646C6F; --text-muted: #92999B;
  --border-soft: #DADDD9; --border-subtle: #E5E5E0; --rule: #C4C8C3;
  /* Contextes (fond pastel / repère soutenu) */
  --context-mission: #DCE8EF; --context-mission-strong: #9FBFD0;
  --context-professional: #DDE9DF; --context-professional-strong: #95B69B;
  --context-planning: #F1DFCF; --context-planning-strong: #D3A87C;
  --context-documents: #EAE4D8; --context-documents-strong: #BEAF94;
  --context-finance: #DDE7E2; --context-finance-strong: #91AFA1;
  /* États (légèrement assombris pour le contraste du texte, AA) */
  --status-open-bg: #F5E2CC; --status-open-text: #965A22;
  --status-assigned-bg: #DCE8EF; --status-assigned-text: #46687D;
  --status-success-bg: #DDE9DF; --status-success-text: #4A6A50;
  --status-warning-bg: #EFE1C8; --status-warning-text: #7D5A22;
  --status-error-bg: #F1D8D5; --status-error-text: #8A463F;
  /* Alias utilisés par les composants */
  --bg: var(--bg-app); --surface: var(--bg-surface); --surface-2: var(--bg-surface-soft); --ink: var(--text-primary); --muted: var(--text-secondary);
  --line: var(--border-soft); --line-soft: var(--border-subtle);
  --brand: #3F6478; --brand-ink: #2E4D5E; --brand-dark: #2F4B5B; --brand-soft: #E3EBEF;
  --ok: var(--status-success-text); --ok-bg: var(--status-success-bg); --warn: var(--status-warning-text); --warn-bg: var(--status-warning-bg);
  --danger: var(--status-error-text); --danger-bg: var(--status-error-bg); --info: var(--status-assigned-text); --info-bg: var(--status-assigned-bg);
  --c-missions: var(--context-mission); --c-missions-ink: #3E6177; --c-pros: var(--context-professional); --c-pros-ink: #4B6A52;
  --c-planning: var(--context-planning); --c-planning-ink: #8A5B2B; --c-docs: var(--context-documents); --c-docs-ink: #6B5F48;
  --c-finance: var(--context-finance); --c-finance-ink: #3F6354; --c-plain: #EAE8E1; --c-plain-ink: #2F3A42;
  --ctx: var(--c-plain); --ctx-ink: var(--c-plain-ink);
  --radius: 10px; --shadow: none;
  --bar-h: 46px; --nav-h: 64px;
  --font: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .4rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
p { margin: .4rem 0; }
a { color: var(--brand-ink); }
.muted { color: var(--muted); } .small { font-size: .86rem; } .mt { margin-top: 1rem; } .mt-s { margin-top: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.warn-text { color: var(--warn); } .flip { transform: scaleX(-1); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ico-xs { width: 13px; height: 13px; vertical-align: -2px; } .ico-sm { width: 16px; height: 16px; vertical-align: -3px; } .ico-md { width: 20px; height: 20px; } .ico-lg { width: 28px; height: 28px; }

/* ---------- Barre de démo ---------- */
.demo-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .5rem 1rem; background: var(--brand-dark); color: #fff; min-height: var(--bar-h); }
.demo-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; background: #ffd166; color: #3a2a00; padding: .2rem .55rem; border-radius: 99px; white-space: nowrap; }
.seg { display: inline-flex; background: rgba(255,255,255,.12); border-radius: 10px; padding: 3px; }
.seg-btn { border: 0; background: transparent; color: #fff; font: inherit; font-size: .86rem; padding: .4rem .8rem; border-radius: 8px; cursor: pointer; min-height: 36px; }
.seg-btn.on { background: #fff; color: var(--brand-dark); font-weight: 600; }
.demo-bar select { font: inherit; font-size: .86rem; max-width: 260px; min-height: 36px; border-radius: 8px; border: 0; padding: 0 .5rem; background: #fff; color: #10283a; }
.acct-fixed { font-size: .86rem; opacity: .9; }
.demo-bar .btn.light { color: #fff; margin-left: auto; } .demo-bar .btn.light + .btn.light { margin-left: 0; }
.demo-bar .btn.light:hover { background: rgba(255,255,255,.14); }

/* ---------- Coquille ---------- */
.shell { display: block; }
.main { padding: 1rem 1rem calc(var(--nav-h) + 1.5rem); max-width: 1180px; margin: 0 auto; outline: none; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav .brand, .nav-foot { display: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-h); padding: .3rem .1rem; font-size: .7rem; text-decoration: none; color: var(--muted); text-align: center; line-height: 1.15; }
.nav-item.active { color: var(--brand-ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--brand); }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); align-items: start; }
  .nav { position: sticky; top: var(--bar-h); bottom: auto; flex-direction: column; height: calc(100vh - var(--bar-h)); border-top: 0; border-right: 1px solid var(--line); padding: 1rem .75rem; gap: .15rem; }
  .nav .brand { display: flex; margin: 0 .5rem 1rem; } .nav-foot { display: block; margin-top: auto; padding: .5rem; }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: .7rem; min-height: 44px; padding: .5rem .75rem; font-size: .95rem; border-radius: 10px; text-align: left; }
  .nav-item.active { background: var(--brand-soft); box-shadow: none; }
  .nav-item:hover { background: var(--brand-soft); }
  .main { padding: 1.5rem 2rem 3rem; width: 100%; }
}
.brand { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; color: var(--brand-ink); font-weight: 500; } .brand b { font-weight: 800; } .brand-lg { font-size: 1.4rem; margin-bottom: 1rem; }

/* ---------- Mise en page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.page-head p { margin: .25rem 0 0; } .page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid > * { min-width: 0; } .stack { display: grid; gap: 1rem; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.grid > .card, .stack > .card { margin-bottom: 0; } .card.flush { padding: 0; overflow: hidden; } .card-ok { border-color: var(--ok); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; } .card-head h2 { margin: 0; }
.link { font-size: .9rem; font-weight: 600; }
.count { font-size: .78rem; background: var(--brand-soft); color: var(--brand-ink); border-radius: 99px; padding: .05rem .5rem; }
.back { display: inline-flex; align-items: center; gap: .2rem; margin-bottom: .6rem; font-size: .92rem; text-decoration: none; font-weight: 600; min-height: 36px; }
.empty { text-align: center; padding: 1.5rem 1rem; } .empty p { margin: .3rem 0 .8rem; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.kpi-link:hover { border-color: var(--brand); } .kpi-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.7rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; } .kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi-warn { border-left: 4px solid var(--warn); } .kpi-danger { border-left: 4px solid var(--danger); } .kpi-ok { border-left: 4px solid var(--ok); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; line-height: 1.4; white-space: nowrap; }
.badge-neutral { background: #e8edf1; color: #3c4c59; } .badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); } .badge-info { background: var(--info-bg); color: var(--info); } .badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: .95rem; font-weight: 600; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--brand-ink); border-color: var(--brand); } .btn-secondary:hover { background: var(--brand-soft); }
.btn-danger { background: var(--danger); color: #fff; } .btn-ghost { background: transparent; color: var(--brand-ink); } .btn-ghost:hover { background: var(--brand-soft); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-sm { min-height: 36px; padding: .25rem .7rem; font-size: .86rem; } .btn-lg { min-height: 52px; font-size: 1.02rem; width: 100%; }
@media (min-width: 640px) { .btn-lg { width: auto; } }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.row-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Listes ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.list .row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); } .list .row:last-child { border-bottom: 0; }
.item { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.item:hover { border-color: var(--brand); } .item-main { flex: 1; min-width: 0; } .item-title { font-weight: 600; } .item-sub { font-size: .86rem; color: var(--muted); }
.dot-tone { width: 10px; height: 10px; border-radius: 50%; flex: none; } .dot-warn { background: #d99a00; } .dot-danger { background: var(--danger); } .dot-info { background: var(--info); }
.dl { display: grid; gap: .6rem; margin: .5rem 0 0; } .dl > div { display: grid; gap: .1rem; } .dl dt { font-size: .8rem; font-weight: 600; color: var(--muted); } .dl dd { margin: 0; }
@media (min-width: 640px) { .dl > div { grid-template-columns: 190px 1fr; gap: 1rem; } }
.timeline { list-style: none; padding: 0 0 0 1rem; margin: 0; border-left: 2px solid var(--line); display: grid; gap: .6rem; } .timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -1.38rem; top: .5rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; border: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.eyebrow { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; font-weight: 700; }
.hero-title { font-size: 1.35rem; font-weight: 700; margin-top: .5rem; text-transform: capitalize; } .hero-time { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero-sub { opacity: .92; margin: .5rem 0 .9rem; } .hero .badge-brand { background: rgba(255,255,255,.2); color: #fff; }
.hero-empty .hero-title { text-transform: none; }

/* ---------- Notices, progression, onglets ---------- */
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .85rem; border-radius: 10px; margin: .6rem 0; font-size: .92rem; }
.notice > .ico { margin-top: 2px; } .notice-info { background: var(--info-bg); color: var(--info); } .notice-warn { background: var(--warn-bg); color: var(--warn); } .notice-danger { background: var(--danger-bg); color: var(--danger); } .notice-neutral { background: #e8edf1; color: #3c4c59; }
.progress { height: 8px; background: #e1e8ee; border-radius: 99px; overflow: hidden; min-width: 70px; } .progress-bar { display: block; height: 100%; border-radius: 99px; }
.progress-ok { background: #1f9d62; } .progress-warn { background: #d99a00; } .progress-danger { background: #d4443b; }
.comp { margin-top: 1rem; } .comp-top { display: flex; justify-content: space-between; margin-bottom: .3rem; font-size: .92rem; }
.pct { display: flex; align-items: center; gap: .5rem; min-width: 120px; } .pct .progress { flex: 1; } .pct span { font-size: .84rem; font-weight: 600; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tab { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--muted); padding: .7rem 1rem; min-height: 44px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.locked { border-style: dashed; }

/* ---------- Stepper / flux ---------- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 0; margin: 1rem 0; }
.stepper li { text-align: center; font-size: .7rem; color: var(--muted); position: relative; } .stepper .dot { display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto .25rem; border-radius: 50%; background: #e1e8ee; font-weight: 700; font-size: .75rem; color: #3c4c59; }
.stepper .done .dot { background: var(--ok); color: #fff; } .stepper .current .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); } .stepper .current { color: var(--ink); font-weight: 700; }
.flow { display: flex; flex-wrap: wrap; gap: .4rem; align-items: stretch; }
.flow-step { flex: 1 1 96px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; text-align: center; } .flow-step.has { background: var(--brand-soft); border-color: var(--brand); }
.flow-n { display: block; font-size: 1.4rem; font-weight: 700; } .flow-l { font-size: .74rem; color: var(--muted); } .flow-arrow { align-self: center; color: var(--muted); display: none; }
@media (min-width: 1100px) { .flow-arrow { display: block; } .flow-step { flex: 1 1 0; } }

/* ---------- Calendrier ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 76px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: inherit; text-align: center; }
button.cal-cell { cursor: pointer; } button.cal-cell:hover { border-color: var(--brand); background: var(--brand-soft); }
.cal-dow { font-size: .66rem; text-transform: uppercase; color: var(--muted); font-weight: 600; } .cal-day { font-weight: 700; font-size: .95rem; }
.cal-chip { display: block; font-size: .64rem; font-weight: 700; padding: 1px 3px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .cal-chip { display: inline-block; font-size: .72rem; padding: 2px 8px; margin: .6rem .4rem 0 0; }
.c-on { background: var(--ok-bg); color: var(--ok); } .c-off { background: var(--danger-bg); color: var(--danger); } .c-mission { background: var(--brand); color: #fff; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: .9rem; } .field { display: grid; gap: .3rem; } .field label { font-size: .88rem; font-weight: 600; }
input, select, textarea { font: inherit; min-height: 44px; padding: .5rem .7rem; border: 1px solid #aebbc6; border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; }
textarea { min-height: 76px; resize: vertical; } input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--brand); }
input:disabled, textarea:disabled { background: var(--bg); color: var(--muted); } .hint { color: var(--muted); font-size: .8rem; }
.form-row { display: grid; gap: .9rem; grid-template-columns: 1fr; } @media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: 2fr 1fr 1fr; } }
.check { display: flex; gap: .7rem; align-items: center; min-height: 44px; cursor: pointer; } .checklist { list-style: none; margin: 0; padding: 0; }
.toolbar { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; } .toolbar .field { min-width: 200px; flex: 1; max-width: 340px; }
.compare { display: flex; gap: 2rem; background: var(--bg); border-radius: 10px; padding: .7rem 1rem; } .compare div { display: grid; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; } .table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); white-space: nowrap; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; } .table tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.td-act { white-space: nowrap; text-align: right !important; }
@media (max-width: 800px) {
  .table-stack thead { position: absolute; left: -9999px; } .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .6rem .8rem; border-bottom: 8px solid var(--bg); } .table-stack td { border: 0; padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-stack td[data-l]::before { content: attr(data-l); font-size: .76rem; font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .table-stack td:first-child { display: block; text-align: left; overflow-wrap: anywhere; } .table-stack td:first-child::before { display: none; }
  .table-stack td.td-act { justify-content: flex-end; padding-top: .5rem; flex-wrap: wrap; }
  .table-stack .pct { min-width: 0; width: 55%; }
}

/* ---------- Candidats, secret, rôles ---------- */
.cands { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cand { border: 1px solid var(--line); border-radius: 10px; padding: .85rem; background: var(--surface); display: grid; gap: .3rem; align-content: start; }
.cand-head { display: flex; gap: .7rem; align-items: center; } 
.cand-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .4rem; }
.demo-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 1rem; border: 1px dashed var(--brand); border-radius: 10px; color: var(--brand-ink); font-size: .9rem; font-weight: 600; }
.secret { border-left: 4px solid var(--muted); } .secret-open { border-left-color: var(--ok); }
.secret-value { margin: .5rem 0; padding: .9rem 1rem; background: var(--bg); border-radius: 10px; text-align: center; } .secret-value code { font: 700 1.3rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.secret-open .secret-value { background: var(--ok-bg); color: var(--ok); } .masked code { letter-spacing: .3em; color: var(--muted); }
.letter { background: var(--bg); padding: .8rem 1rem; border-radius: 10px; margin-bottom: .8rem; font-size: .93rem; }

/* ---------- Landing ---------- */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; background: radial-gradient(1000px 500px at 80% -10%, var(--brand-soft), transparent), var(--bg); }
.landing-inner { max-width: 960px; width: 100%; } .landing h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); max-width: 22ch; } .lead { font-size: 1.05rem; color: var(--muted); max-width: 60ch; margin: .8rem 0 1.5rem; }
.role-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; } @media (min-width: 720px) { .role-grid { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1000px) { .role-grid { grid-template-columns: repeat(4, 1fr); } }
.role-card { display: grid; gap: .4rem; text-align: left; font: inherit; color: inherit; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; box-shadow: var(--shadow); min-height: 44px; }
.role-card:hover { border-color: var(--brand); transform: translateY(-1px); } .role-card strong { font-size: 1.15rem; } .role-ico { color: var(--brand); } .role-go { color: var(--brand-ink); font-weight: 600; margin-top: .4rem; }

/* ---------- Dialogue & toasts ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 2rem)); max-height: 90vh; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10, 25, 35, .55); } .dlg-form { padding: 1.2rem; display: grid; gap: .8rem; } .dlg-form h2 { margin: 0; font-size: 1.2rem; } .dlg-body { display: grid; gap: .8rem; overflow: auto; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.toasts { position: fixed; z-index: 100; left: 1rem; right: 1rem; bottom: calc(var(--nav-h) + .8rem); display: grid; gap: .5rem; justify-items: center; pointer-events: none; }
@media (min-width: 960px) { .toasts { left: auto; right: 1.5rem; bottom: 1.5rem; justify-items: end; } }
.toast { pointer-events: auto; display: flex; gap: .6rem; align-items: center; max-width: 440px; padding: .75rem 1rem; border-radius: 12px; background: var(--brand-dark); color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.3); animation: in .25s ease; font-size: .92rem; }
.toast-warn { background: #7d5200; } .toast.out { opacity: 0; transform: translateY(8px); transition: .3s; } @keyframes in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 639px) { .grid:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .kpi { padding: .7rem .75rem; } .kpi-value { font-size: 1.45rem; } }
@media (max-width: 959px) { .demo-bar { position: static; } }
@media (max-width: 520px) { .demo-bar { padding: .5rem .75rem; } .demo-bar select { max-width: 100%; flex: 1; } .demo-tag { display: none; } .main { padding-left: .85rem; padding-right: .85rem; } }

.db-tag { font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 99px; border: 1px solid rgba(255,255,255,.4); color: #fff; white-space: nowrap; }

/* ---------- Avatars & logos ---------- */
.avatar, .logo { --h: 200; --s: 42px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--s) * .38); object-fit: cover; color: hsl(var(--h) 55% 22%); background: hsl(var(--h) 60% 90%); vertical-align: middle; }
.avatar { border-radius: 50%; } .logo { border-radius: 10px; border: 1px solid var(--line); background-color: hsl(var(--h) 60% 92%); }
img.logo { background: #fff; object-fit: contain; padding: 2px; }
.avatar-xs, .logo-xs { --s: 24px; } .avatar-sm, .logo-sm { --s: 32px; } .avatar-md, .logo-md { --s: 48px; } .avatar-lg, .logo-lg { --s: 56px; } .avatar-xl, .logo-xl { --s: 96px; }
.who { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; min-width: 0; } .who > span:last-child { overflow-wrap: anywhere; }
.who-head { display: flex; align-items: center; gap: .9rem; } .who-head p { margin: 0; }
.photo-box { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: .75rem; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.kcol { flex: 0 0 min(82vw, 292px); scroll-snap-align: start; background: color-mix(in srgb, var(--line) 38%, var(--bg)); border-radius: 14px; padding: .6rem; border-top: 4px solid var(--muted); min-height: 120px; }
.kcol-info { border-top-color: var(--info); } .kcol-brand { border-top-color: var(--brand); } .kcol-warn { border-top-color: #d99a00; } .kcol-ok { border-top-color: #1f9d62; } .kcol-danger { border-top-color: var(--danger); }
.kcol-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem .2rem .5rem; } .kcol-head h3 { margin: 0; font-size: .86rem; letter-spacing: .01em; }
.kcol-body { display: grid; gap: .55rem; }
/* colonnes toujours côte à côte (de gauche à droite), jamais sur deux lignes : défilement horizontal si la fenêtre est étroite */
.kanban { flex-wrap: nowrap; } .kcol { flex: 1 0 250px; min-width: 250px; max-width: 360px; } @media (max-width: 719px) { .kcol { flex-basis: min(82vw, 292px); min-width: 0; } }
.kcard { display: grid; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .7rem; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
a.kcard:hover { border-color: var(--brand); } .kcard-static { cursor: default; }
.kc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .5rem; font-size: .92rem; } .kcard { min-width: 0; } .kc-top a { color: inherit; text-decoration: none; }
.kc-time { font-weight: 700; font-size: .84rem; color: var(--brand-ink); white-space: nowrap; } .kc-sub { font-size: .82rem; } .kc-foot { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .15rem; }
.kc-hours { display: flex; gap: .9rem; font-size: .82rem; color: var(--muted); } .kc-hours b { color: var(--ink); }
.kempty { margin: .4rem .2rem; font-size: .84rem; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 10px; padding: .9rem .4rem; }
.kmore { text-align: center; font-size: .84rem; font-weight: 600; padding: .3rem; }
.btn-row.tight { margin-top: .3rem; gap: .4rem; }

/* ---------- Bandeau de progression ---------- */
.pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.pipe-6 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 720px) { .pipe { grid-template-columns: repeat(4, 1fr); } .pipe-6 { grid-template-columns: repeat(6, 1fr); } }
.pipe-step { display: grid; gap: .1rem; text-align: center; padding: .7rem .4rem; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.pipe-step.has { color: var(--ink); background: var(--brand-soft); border-color: var(--brand); } .pipe-n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; } .pipe-l { font-size: .78rem; font-weight: 600; } .pipe-h { font-size: .78rem; color: var(--muted); }
.pipe-validees.has { background: var(--info-bg); border-color: var(--info); } .pipe-payees.has { background: var(--ok-bg); border-color: #1f9d62; } .pipe-transmises.has { background: var(--warn-bg); border-color: #d99a00; }

/* ---------- Sélecteur de vue ---------- */
.vswitch { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.vs-btn { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: transparent; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); padding: .4rem .7rem; min-height: 40px; border-radius: 8px; cursor: pointer; }
.vs-btn.on { background: var(--brand); color: #fff; }
@media (max-width: 480px) { .vs-btn span { display: none; } .vs-btn { padding: .4rem .85rem; } }

/* ---------- Calendrier mensuel ---------- */
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; } .mc-head h2 { margin: 0; text-transform: capitalize; }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mc-dow { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: .2rem 0; }
.mc-cell { min-height: 78px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); min-width: 0; } .mc-empty { background: transparent; border-color: transparent; }
.mc-today { border: 2px solid var(--brand); } .mc-day { font-size: .78rem; font-weight: 700; color: var(--muted); }
.mc-chip { display: block; font-size: .66rem; font-weight: 700; padding: 2px 4px; border-radius: 5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-neutral { background: #e3e8ec; color: #33424e; } .mc-info { background: var(--info-bg); color: var(--info); } .mc-brand { background: var(--brand); color: #fff; } .mc-warn { background: var(--warn-bg); color: var(--warn); } .mc-ok { background: var(--ok-bg); color: var(--ok); }
.mc-more { font-size: .66rem; color: var(--muted); }
.legend .mc-chip { display: inline-block; font-size: .72rem; padding: 2px 8px; margin: .6rem .4rem 0 0; }
@media (max-width: 560px) { .mc-cell { min-height: 62px; } .mc-chip { font-size: .58rem; padding: 1px 2px; } }

/* ---------- Boîte « À traiter » ---------- */
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.inb { display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 12px; padding: .8rem 1rem; box-shadow: var(--shadow); }
.inb-danger { border-left-color: var(--danger); } .inb-warn { border-left-color: #d99a00; } .inb-info { border-left-color: var(--info); } .inb-ok { border-left-color: #1f9d62; }
.inb-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--bg); color: var(--brand-ink); }
.inb-main { display: grid; gap: .05rem; min-width: 0; } .inb-kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.inb-act { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; } .amt { font-size: 1.15rem; margin-right: auto; }
@media (min-width: 720px) { .inb { grid-template-columns: auto 1fr auto; } .inb-act { grid-column: auto; } .amt { margin-right: .5rem; } }

/* ---------- Factures ---------- */
.inv-amt { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; } .inv-overdue { border-color: var(--danger); } .inv-paid { opacity: .85; }
.pay-box { display: grid; gap: .5rem; background: var(--bg); border-radius: 10px; padding: .8rem 1rem; } .pay-box div { display: grid; }
.nav-item { position: relative; } .nav-badge { position: absolute; top: 6px; right: calc(50% - 26px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .72rem; display: grid; place-items: center; }
@media (min-width: 960px) { .nav-badge { position: static; margin-left: auto; } }

/* ---------- Tarif (attractif) ---------- */
.rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin: .5rem 0; padding: .65rem .9rem; border-radius: 12px; background: linear-gradient(135deg, var(--ok-bg), var(--brand-soft)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.rate-h { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--ok); } .rate-h small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.rate-t { font-size: .88rem; color: var(--ink); } .rate-sm { padding: .4rem .65rem; margin: .2rem 0; } .rate-sm .rate-h { font-size: 1.1rem; } .rate-sm .rate-t { font-size: .78rem; }
.hero-rate { display: inline-block; margin: 0 0 .9rem; padding: .35rem .7rem; border-radius: 99px; background: rgba(255,255,255,.18); font-weight: 700; font-size: .92rem; }
.hero-rate.big { display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 14px; margin: .2rem 0 0; background: rgba(255,255,255,.16); }
.hero-rate.big span { font-size: 1.6rem; font-weight: 800; line-height: 1.2; } .hero-rate.big small { font-size: .82rem; font-weight: 600; opacity: .85; }
.read-cta { border: 2px solid var(--brand); }

/* ---------- Divers professionnel ---------- */
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.sb-ok { background: #1f9d62; } .sb-info { background: #4a7fd1; } .sb-warn { background: #d99a00; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; font-size: .92rem; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; } .sw { width: 46px; height: 26px; border-radius: 99px; background: #aab6c0; position: relative; flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; } .switch input:checked + .sw { background: #1f9d62; } .switch input:checked + .sw::after { transform: translateX(20px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--brand); outline-offset: 2px; }
.fs { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem .7rem; margin: .5rem 0 0; } .fs legend { font-weight: 700; font-size: .86rem; padding: 0 .3rem; }
.checks { display: grid; gap: .1rem; } .fs .checks { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.reminders { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .84rem; display: grid; gap: .3rem; }
.cvlist { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .5rem; } .cvlist li { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.fin-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; } .fin-nav h2 { margin: 0; } .cap { text-transform: capitalize; }
.row-on { background: var(--brand-soft); } .row-total th { background: var(--bg); font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.card-warn { border-color: var(--danger); } .card-head.pad { padding: 1rem 1rem 0; } .tight-bar { margin-bottom: .8rem; } .chips.inline { display: inline-flex; margin-top: 0; }
code { font: .82rem ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 520px) { .seg-btn { padding: .4rem .5rem; font-size: .78rem; } .demo-bar { gap: .4rem; } }

/* ---------- Évaluations ---------- */
.rcrits { display: grid; gap: .5rem; } .rcrit { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; flex: none; } .stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 1.9rem; line-height: 1; padding: 0 .12rem; color: #b8c2cb; cursor: pointer; min-width: 34px; text-align: center; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #e0a300; } .stars input:focus-visible + label { outline: 3px solid var(--brand); border-radius: 6px; }
.starsv { color: #e0a300; letter-spacing: .05em; white-space: nowrap; } .starsv .off { color: #b8c2cb; }
.rv-avg { font-size: 1.05rem; margin-bottom: .4rem; } .rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .86rem; } .rv-list li { display: flex; justify-content: space-between; gap: .6rem; }
.rv-comment { margin: .6rem 0 0; padding: .6rem .8rem; border-left: 4px solid var(--brand); background: var(--bg); border-radius: 0 10px 10px 0; font-size: .92rem; }
.rv-lock { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: .9rem; } .rv-lock p { margin: 0; }
.rate-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; } @media (min-width: 720px) { .rate-grid { grid-template-columns: repeat(3, 1fr); } }

[hidden] { display: none !important; }

.mid { font: 700 .74rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--muted); }

/* ---------- Carte de mission v2 ---------- */
.mission-no { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding: .6rem .9rem; background: var(--brand-soft); border-radius: 10px; } .mission-no strong { font: 800 1.15rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--brand-ink); }
.mission-no-lg strong { font-size: 1.5rem; } .hero-id { font: 800 1.9rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; margin: .3rem 0 .4rem; }
.chips.tops { gap: .5rem; margin: .5rem 0; } .topchip { display: inline-grid; gap: .05rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); } .topchip b { font-size: .95rem; }
.tops-hero .topchip { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; } .tops-hero .topchip .muted { color: rgba(255,255,255,.8); }
.blocks { border-top: 1px solid var(--line); padding-top: .8rem; } .blocks .card-head h2 { margin: 0; }
.blk { border: 1px dashed var(--brand); border-radius: 12px; padding: .8rem; margin: .6rem 0; display: grid; gap: .6rem; background: var(--bg); } .blk-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.blk-l { display: grid; gap: .25rem; font-size: .86rem; font-weight: 600; } .blk-l input, .blk-l select, .blk-l textarea { font-weight: 400; }
.site-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; } .site-prev { margin: 0; gap: .35rem; } .site-prev.inner { margin-top: .3rem; }
.daylist { gap: .6rem; } .dayblk { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; background: var(--surface); display: grid; gap: .45rem; } .dayblk-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wrapcode { font-size: 1rem !important; letter-spacing: .02em !important; white-space: pre-wrap; word-break: break-word; text-align: left; display: block; }
.annex .btn-ghost { padding-left: 0; } .pdf-cta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border: 2px solid var(--brand); } .pdf-cta h2 { margin: 0 0 .3rem; } .pdf-cta p { margin: 0; max-width: 60ch; }

dialog:has(.blocks) { width: min(760px, calc(100vw - 2rem)); } .row-err { background: color-mix(in srgb, var(--danger-bg) 55%, transparent); } .csv-cols li { font-size: .9rem; padding: .15rem 0; }
.csv-cols code, .table code { background: var(--bg); padding: .05rem .35rem; border-radius: 5px; }

.table td.nw { white-space: nowrap; } .table td.ctl { min-width: 220px; } .table td.ctl .badge { margin: 0 .25rem .25rem 0; white-space: normal; }

/* ================= Finitions démo ================= */
.demo-bar { gap: .5rem 1rem; } .bar-tags { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .bar-acct { min-width: 0; display: flex; align-items: center; } .bar-actions { margin-left: auto; display: flex; gap: .15rem; }
.demo-bar .btn.light { margin-left: 0 !important; } .db-tag.db-on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #54d68f; margin-right: .4rem; }
.rl-short, .nl-short { display: none; }
@media (max-width: 639px) {
  .rl-full { display: none; } .rl-short { display: inline; }
  .demo-bar { display: grid; grid-template-columns: 1fr auto; padding: .5rem .75rem; } .bar-tags { grid-column: 1 / -1; } .demo-tag { display: inline-block !important; }
  .seg { grid-column: 1 / -1; display: flex; } .seg-btn { flex: 1; padding: .4rem .2rem; font-size: .8rem; } .bar-acct { grid-column: 1; } .bar-acct select { width: 100%; max-width: 100%; } .bar-actions { grid-column: 2; margin-left: 0; }
}
@media (max-width: 959px) { .nl-full { display: none; } .nl-short { display: inline; } }
.badge { white-space: normal; border-radius: 14px; text-align: left; } .chips.tops .badge { align-self: center; }
.btn { max-width: 100%; } .btn-ghost.btn-sm { white-space: normal; text-align: left; height: auto; min-height: 36px; overflow-wrap: anywhere; }
.role-grid { align-items: stretch; } .role-card { display: flex; flex-direction: column; } .role-go { margin-top: auto; padding-top: .8rem; }
.guide { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin: 0 0 1.2rem; box-shadow: var(--shadow); } .guide h2 { margin-bottom: .6rem; } .guide ol { margin: 0 0 .6rem; padding-left: 1.3rem; display: grid; gap: .35rem; }
.landing-inner { max-width: 1060px; } .landing h1 { max-width: 24ch; }

.demo-bar select { max-width: 230px; } .demo-tag { letter-spacing: .05em; }
.hero-rate { display: flex; width: fit-content; max-width: 100%; margin: .2rem 0 1rem; } .hero .hero-sub { margin-bottom: .4rem; }

.ws-tag { font: inherit; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; cursor: pointer; white-space: nowrap; } .ws-tag:hover { background: rgba(255,255,255,.14); }
/* tableaux plus compacts : toutes les colonnes visibles sans défilement dès 1280 px */
.table { font-size: .88rem; } .table th, .table td { padding: .55rem .6rem; } .table thead th { font-size: .72rem; letter-spacing: .03em; }
.pct { min-width: 0; gap: .4rem; } .pct .progress { min-width: 56px; max-width: 90px; } .table .who { gap: .45rem; } .table .who .muted { overflow-wrap: anywhere; }
.table td .badge { white-space: normal; }
.site-prev > div { grid-template-columns: minmax(80px, 125px) 1fr !important; gap: .6rem !important; } .cand .site-prev { margin-top: .4rem; }
@media (max-width: 800px) { .table-stack .cellv { text-align: right; } }

/* ---- Finance admin : paie des heures et factures par bloc ---- */
.pay-block { padding: 1rem 1.1rem; }
.pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem; align-items: center; margin-bottom: .7rem; }
.pay-who { display: flex; align-items: center; gap: .75rem; min-width: 0; } .pay-who h3 { margin: 0; font-size: 1.05rem; }
.pay-sum { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; } .pay-sum > div { display: grid; } .pay-sum strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.pay-prog { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: .8rem; } .pay-prog span { display: block; height: 100%; background: var(--ok, #1a7f4b); border-radius: 99px; }
.pay-block .btn-row { margin-top: .8rem; }
details.hist summary { cursor: pointer; font-size: .82rem; color: var(--muted); } details.hist[open] summary { margin-bottom: .5rem; } details.hist .timeline { font-size: .84rem; }
.toolbar-end { align-self: end; }
@media (max-width: 720px) { .pay-sum { gap: .4rem 1rem; } }

/* =====================================================================================================
   REFONTE VISUELLE V1 — « Swiss Editorial SaaS » (docs/SIDEQUEST_VISUAL_DIRECTION_V1.md)
   Strict dans la structure, doux dans l'expérience : surfaces chaudes, typographie forte, peu de cartes,
   couleurs de contexte discrètes. Cette couche prime sur les règles précédentes (mêmes sélecteurs, chargée en dernier).
   ===================================================================================================== */
.main[data-ctx="missions"] { --ctx: var(--c-missions); --ctx-ink: var(--c-missions-ink); }
.main[data-ctx="pros"] { --ctx: var(--c-pros); --ctx-ink: var(--c-pros-ink); }
.main[data-ctx="planning"] { --ctx: var(--c-planning); --ctx-ink: var(--c-planning-ink); }
.main[data-ctx="docs"] { --ctx: var(--c-docs); --ctx-ink: var(--c-docs-ink); }
.main[data-ctx="finance"] { --ctx: var(--c-finance); --ctx-ink: var(--c-finance-ink); }

/* --- Typographie --- */
body { font: 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1 { font-size: clamp(1.75rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -.028em; line-height: 1.08; }
h2 { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
h2 > .ico, .card-head h2 .ico { display: none; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
.small { font-size: .84rem; } .hint { font-size: .78rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- Barre de démo : discrète, hors du langage du produit --- */
.demo-bar { background: var(--surface-2); color: var(--ink); border-bottom: 1px solid var(--line); min-height: var(--bar-h); padding: .35rem 1.25rem; }
.demo-tag { background: var(--warn-bg); color: var(--warn); font-weight: 600; letter-spacing: .06em; font-size: .68rem; border-radius: 5px; }
.db-tag, .ws-tag { border: 1px solid var(--line); color: var(--muted); border-radius: 5px; background: transparent; font-size: .7rem; }
.ws-tag:hover { background: var(--surface); }
.seg { background: var(--line-soft); border-radius: 8px; padding: 2px; }
.seg-btn { color: var(--muted); border-radius: 6px; min-height: 32px; font-size: .82rem; }
.seg-btn.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.demo-bar select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; min-height: 32px; }
.demo-bar .btn.light, .acct-fixed { color: var(--muted); } .demo-bar .btn.light:hover { background: var(--line-soft); color: var(--ink); }

/* --- Coquille et navigation éditoriale --- */
.main { padding: 1.4rem 1.25rem calc(var(--nav-h) + 1.5rem); max-width: 1240px; }
.nav { background: var(--surface); border-top: 1px solid var(--line); }
.nav-n { display: none; }
.nav-item { color: var(--muted); font-size: .68rem; }
.nav-item.active { color: var(--ctx-ink, var(--brand-ink)); font-weight: 600; box-shadow: inset 0 2px 0 currentColor; }
.nav-item.ctx-missions.active { color: var(--c-missions-ink); } .nav-item.ctx-pros.active { color: var(--c-pros-ink); } .nav-item.ctx-planning.active { color: var(--c-planning-ink); }
.nav-item.ctx-docs.active { color: var(--c-docs-ink); } .nav-item.ctx-finance.active { color: var(--c-finance-ink); } .nav-item.ctx-plain.active { color: var(--c-plain-ink); }
.nav-badge { background: var(--warn); color: var(--surface); font-weight: 600; }
.brand { color: var(--ink); font-size: 1.1rem; letter-spacing: -.02em; font-weight: 400; } .brand b { font-weight: 700; }
@media (min-width: 960px) {
  .shell { grid-template-columns: 276px minmax(0, 1fr); }
  .nav { background: transparent; border-right: 1px solid var(--line); padding: 2rem 1.1rem 1.5rem 1.4rem; gap: .2rem; }
  .nav .brand { margin: 0 .4rem 2.2rem; font-size: 1.2rem; }
  .nav-item { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; align-items: baseline; gap: 0; min-height: 52px; padding: .9rem .8rem; border-radius: 10px; font-size: 1.05rem; color: var(--ink); letter-spacing: -.012em; transition: background .15s, color .15s; }
  .nav-item .ico { display: none; }
  .nav-n { display: inline; font-size: .7rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; align-self: center; }
  .nav-item:hover { background: var(--surface-2); }
  .nav-item.active { box-shadow: none; font-weight: 600; }
  .nav-item.active.ctx-plain { background: var(--c-plain); } .nav-item.active.ctx-missions { background: var(--c-missions); } .nav-item.active.ctx-pros { background: var(--c-pros); }
  .nav-item.active.ctx-planning { background: var(--c-planning); } .nav-item.active.ctx-docs { background: var(--c-docs); } .nav-item.active.ctx-finance { background: var(--c-finance); }
  .nav-item.active .nav-n { color: inherit; }
  .nav-badge { margin-left: .5rem; align-self: center; }
  .nav-foot { font-size: .72rem; letter-spacing: .02em; padding: .5rem .4rem; }
  .main { padding: 2.4rem 3rem 4rem; }
}

/* --- En-têtes de page : titre fort, filet fin, texte d'aide discret --- */
.page-head { margin: .25rem 0 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); align-items: flex-end; }
.page-head p { font-size: .9rem; max-width: 62ch; margin-top: .4rem; }

/* --- Surfaces : peu de cartes. Les sections de premier niveau sont ouvertes (filet + espace) ; la carte reste un vrai regroupement --- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.25rem; box-shadow: none; }
.main > .card, .main > section.card { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.4rem 0 .6rem; margin-bottom: 1.6rem; }
.main > .card.flush, .main > section.card.flush { padding: .9rem 0 0; }
.main > .card.mt, .main > section.card.mt { margin-top: 1.6rem; }
.card.flush { overflow: visible; }
.card-head.pad { padding: 0 0 .2rem; }
.card-warn { border-color: var(--warn); } .card-ok { border-color: var(--ok); }
.grid { gap: 1.25rem; } .stack { gap: 1.25rem; }
.count { background: var(--ctx); color: var(--ctx-ink); border-radius: 5px; font-weight: 600; font-size: .72rem; letter-spacing: 0; text-transform: none; }
.link { font-weight: 500; font-size: .86rem; }
.empty { padding: 2.4rem 1rem; color: var(--muted); } .empty strong { color: var(--ink); font-weight: 600; }

/* --- Chiffres : composition typographique, sans boîtes --- */
.kpi { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; box-shadow: none; padding: .7rem 0 .4rem; gap: .2rem; }
.kpi-label { font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; }
.kpi-link:hover .kpi-value { color: var(--brand-ink); } .kpi-link:hover { border-top-color: var(--brand); }
.kpi-warn { border-top: 2px solid var(--warn); } .kpi-danger { border-top: 2px solid var(--danger); } .kpi-ok { border-top: 2px solid var(--ok); } .kpi-warn, .kpi-danger, .kpi-ok { border-left: 0; }
.grid > .kpi { min-width: 0; }

/* --- Statuts : sobres, jamais la couleur seule (texte + forme) --- */
.badge { font-size: .72rem; font-weight: 600; letter-spacing: .005em; padding: .12rem .5rem; border-radius: 6px; }
.badge-neutral { background: var(--surface-2); color: var(--muted); } .badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-danger { background: var(--danger-bg); color: var(--danger); } .badge-info { background: var(--info-bg); color: var(--info); }
.badge .ico { width: 12px; height: 12px; vertical-align: -2px; }
.progress { background: var(--surface-2); height: 6px; } .progress-ok { background: var(--ok); } .progress-warn { background: #c89443; } .progress-danger { background: #c06a62; }

/* --- Boutons : une action dominante, le reste en retrait --- */
.btn { border-radius: 8px; font-weight: 500; font-size: .92rem; min-height: 42px; letter-spacing: -.005em; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand-dark); color: #fff; } .btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); } .btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost { color: var(--brand-ink); } .btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; } .btn-light { background: var(--surface); color: var(--ink); }
.btn-sm { min-height: 34px; font-size: .82rem; padding: .2rem .65rem; }

/* --- Listes et tableaux : alignements stricts, très peu de bordures --- */
.table { font-size: .875rem; }
.table th, .table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line-soft); }
.table thead th { background: transparent; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .09em; border-bottom: 1px solid var(--ink); padding-bottom: .55rem; }
.table tbody tr { transition: background .12s; } .table tbody tr:hover { background: color-mix(in srgb, var(--ctx) 70%, transparent); }
.table tbody tr.row-link { cursor: pointer; }
.table td:first-child, .table th:first-child { padding-left: 0; } .table td:last-child, .table th:last-child { padding-right: 0; }
.row-on { background: var(--ctx); }
.list .row { border-bottom: 1px solid var(--line-soft); padding: .7rem 0; }
.item { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; padding: .9rem .25rem; transition: background .12s; }
.item:hover { background: color-mix(in srgb, var(--ctx) 70%, transparent); border-color: var(--line-soft); }
.card-list { display: block; } .item-title { font-weight: 500; }
.dl dt { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.timeline { border-left-color: var(--line); } .timeline li::before { background: var(--ctx-ink, var(--brand)); width: 7px; height: 7px; }
.table code, .csv-cols code { background: var(--surface-2); border-radius: 4px; }
@media (max-width: 800px) { .table-stack tr { border-bottom: 1px solid var(--line); padding: .8rem 0; } .table-stack td:first-child { padding-left: 0; } }

/* --- Onglets et sélecteur de vue --- */
.tabs { border-bottom: 1px solid var(--line); gap: 1.4rem; }
.tab { font-weight: 500; padding: .75rem 0; border-bottom-width: 2px; } .tab.active { color: var(--ink); border-bottom-color: var(--ctx-ink, var(--brand)); font-weight: 600; }
.vswitch { background: var(--surface-2); border: 0; border-radius: 8px; padding: 2px; }
.vs-btn { border-radius: 6px; font-weight: 500; min-height: 34px; } .vs-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

/* --- Avis, secrets, accents --- */
.notice { border-radius: 8px; font-size: .88rem; border-left: 3px solid currentColor; padding: .65rem .9rem; }
.notice-neutral { background: var(--surface-2); color: var(--muted); }
.secret { border-left: 3px solid var(--muted); } .secret-open { border-left-color: var(--ok); }
.secret-value, .letter, .pay-box, .compare, .flow-step, .pipe-step { background: var(--surface-2); border-radius: 8px; border: 0; }
.demo-tools { border: 1px dashed var(--line); color: var(--muted); border-radius: 8px; }
.rate { background: var(--c-finance); border: 0; border-radius: 8px; } .rate-h { color: var(--c-finance-ink); }
.read-cta, .pdf-cta { border: 1px solid var(--line); background: var(--c-docs); border-radius: var(--radius); }
.hero { background: var(--c-missions); color: var(--ink); border: 0; }
.eyebrow { color: var(--c-missions-ink); opacity: 1; letter-spacing: .1em; }
.hero-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; } .hero-time { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -.035em; color: var(--c-missions-ink); }
.hero-sub { opacity: 1; color: var(--muted); } .hero .badge-brand, .hero-rate, .hero-rate.big { background: rgba(255, 255, 255, .55); color: var(--ink); }
.hero .btn-light, .hero .btn-secondary { background: var(--brand-dark); color: #fff; border-color: transparent; }

/* --- Progression, étapes, flux --- */
.stepper .dot { background: var(--surface-2); color: var(--muted); } .stepper .done .dot { background: var(--ok); color: var(--surface); }
.stepper .current .dot { background: var(--ctx-ink, var(--brand)); color: var(--surface); box-shadow: 0 0 0 4px var(--ctx); }
.pipe-step { padding: .85rem .5rem; } .pipe-step.has { background: var(--c-missions); border: 0; color: var(--c-missions-ink); }
.pipe-n { font-weight: 500; letter-spacing: -.03em; } .pipe-l { font-weight: 500; }
.pipe-validees.has { background: var(--info-bg); color: var(--info); } .pipe-payees.has { background: var(--ok-bg); color: var(--ok); } .pipe-transmises.has { background: var(--warn-bg); color: var(--warn); } .pipe-attente.has { background: var(--c-planning); color: var(--c-planning-ink); }
.flow-step.has { background: var(--c-missions); border: 0; }

/* --- Boards (colonnes côte à côte) : surfaces ouvertes, cartes fines --- */
.kcol { background: color-mix(in srgb, var(--surface-2) 55%, transparent); border-radius: var(--radius); border-top: 2px solid var(--muted); padding: .7rem; }
.kcol-info { border-top-color: var(--info); } .kcol-brand { border-top-color: var(--brand); } .kcol-warn { border-top-color: #c89443; } .kcol-ok { border-top-color: var(--ok); } .kcol-danger { border-top-color: var(--danger); }
.kcol-head h3 { font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kcard { border: 1px solid var(--line-soft); border-radius: 8px; box-shadow: none; background: var(--surface); transition: border-color .12s; }
a.kcard:hover { border-color: var(--ctx-ink, var(--brand)); } .kc-time { color: var(--ctx-ink, var(--brand-ink)); } .mid { font-size: .74rem; letter-spacing: .02em; }
.kempty { border: 1px dashed var(--line); border-radius: 8px; }

/* --- À traiter (boîte) : lignes calmes, repère de couleur fin --- */
.inb { background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-left: 3px solid var(--muted); border-radius: 0; box-shadow: none; padding: .9rem 1rem; }
.inb-danger { border-left-color: var(--danger); } .inb-warn { border-left-color: #c89443; } .inb-info { border-left-color: var(--info); } .inb-ok { border-left-color: var(--ok); }
.inb-ico { background: var(--surface-2); border-radius: 8px; } .inb-kind { letter-spacing: .09em; }
.amt { font-weight: 500; letter-spacing: -.02em; }
.inv-amt { font-weight: 500; letter-spacing: -.03em; }

/* --- Calendriers --- */
.cal-cell, .mc-cell { border-radius: 6px; border-color: var(--line-soft); background: var(--surface); } .mc-empty { background: transparent; border-color: transparent; }
.mc-today { border: 1.5px solid var(--ctx-ink, var(--brand)); } .mc-dow { letter-spacing: .08em; font-weight: 600; }
.mc-neutral { background: var(--surface-2); color: var(--muted); } .mc-brand { background: var(--c-missions); color: var(--c-missions-ink); }
.mc-chip { font-weight: 600; border-radius: 4px; }

/* --- Formulaires : calmes, étiquettes sobres --- */
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field label { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.fs { border: 1px solid var(--line-soft); border-radius: 8px; } .fs legend { color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.sw { background: var(--line); } .switch input:checked + .sw { background: var(--brand); }
.blk, .cvlist li, .cand { border-color: var(--line-soft); border-radius: 8px; }
.mission-no { background: var(--surface-2); border-radius: 8px; }

/* --- Avatars, logos : teintes calmes --- */
.avatar, .logo { background: var(--ctx); color: var(--ctx-ink); } .logo { border: 0; }
img.logo { background: var(--surface); border: 1px solid var(--line-soft); }
.avatar { background: hsl(var(--h) 22% 88%); color: hsl(var(--h) 30% 28%); } .logo { background-color: hsl(var(--h) 20% 90%); color: hsl(var(--h) 28% 28%); }

/* --- Dialogues et notifications --- */
dialog { border-radius: 14px; box-shadow: 0 24px 70px rgba(20, 24, 28, .28); border: 1px solid var(--line-soft); }
dialog[open] { animation: dlg-in .18s ease-out; } @keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.99); } }
dialog::backdrop { background: rgba(28, 33, 38, .42); }
.dlg-form h2 { font-size: 1.25rem; letter-spacing: -.02em; text-transform: none; color: var(--ink); font-weight: 600; }
.toast { background: var(--ink); color: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 24, 28, .22); font-size: .88rem; }
.toast-warn { background: var(--warn); color: var(--surface); }

/* --- Accueil (choix du rôle) : composition éditoriale numérotée --- */
.landing { background: var(--bg); padding: 2.5rem 1.25rem; align-items: start; }
.landing-inner { max-width: 1120px; margin: 0 auto; padding-top: 2vh; }
.landing h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; max-width: 16ch; margin-top: 3rem; }
.lead { font-size: 1.02rem; max-width: 52ch; margin: 1.1rem 0 2.6rem; }
.role-grid { gap: 0; border-top: 1px solid var(--ink); margin-bottom: 2.4rem; }
.role-card { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 1.4rem .25rem 1.5rem; gap: .5rem; transition: background .15s; }
.role-card:hover { background: var(--c-plain); transform: none; }
.role-n { font-size: .75rem; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.role-card strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; }
.role-go { color: var(--ink); font-weight: 500; font-size: .86rem; }
@media (min-width: 1000px) { .role-grid { gap: 0 1.6rem; } .role-card { border-bottom: 0; padding-top: 1.1rem; } }
.guide { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 1.4rem 0 0; }

/* --- Finance admin, blocs par personne ou entreprise --- */
.pay-block { background: var(--surface); }
.pay-prog { background: var(--surface-2); } .pay-prog span { background: var(--ok); }
details.hist summary { color: var(--muted); }
.who-head h1 { margin: 0; }

/* --- Mobile : la hiérarchie et les contextes sont conservés, pas une simple réduction du bureau --- */
@media (max-width: 639px) {
  .main { padding-top: 1rem; } .page-head { margin-bottom: 1.2rem; padding-bottom: .9rem; }
  .grid:has(> .kpi) { gap: 1rem .9rem; } .kpi-value { font-size: 1.7rem; }
  .landing h1 { margin-top: 1.6rem; }
}

/* --- Ajustements après relecture visuelle --- */
.main > .card.hero, .main > section.card.hero { background: var(--c-missions); border: 0; border-radius: var(--radius); padding: 1.5rem 1.6rem; margin-bottom: 1.6rem; }
.page-head + .card, .page-head + section.card, .page-head + .notice + .card { border-top: 0; padding-top: .2rem; }
.table td a, .table td a:visited { text-decoration: none; font-weight: 500; } .table td a:hover { text-decoration: underline; }
.hero-empty { padding: 1.5rem 1.6rem; }

/* =====================================================================================================
   CORRECTION CHROMATIQUE — thème clair canonique : lumière, espace, typographie, pastel (puis interaction)
   ===================================================================================================== */
body { background: var(--bg-app); color: var(--text-primary); }
.shell, .main { background: var(--bg-page); }
.nav { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); }
@media (min-width: 960px) { .nav { background: var(--bg-page); border-top: 0; border-right: 1px solid var(--border-subtle); } }
.landing { background: var(--bg-page); }

/* Barre de démo : secondaire, claire */
.demo-bar { background: var(--bg-surface-soft); color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); }
.demo-tag { background: var(--status-open-bg); color: var(--status-open-text); }
.db-tag, .ws-tag { color: var(--text-secondary); border: 1px solid var(--border-soft); background: transparent; }
.db-tag.db-on { background: var(--status-success-bg); color: var(--status-success-text); border-color: transparent; }
.db-tag.db-on::before { background: var(--context-professional-strong); }
.seg { background: var(--border-subtle); } .seg-btn { color: var(--text-secondary); } .seg-btn.on { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border-soft); }
.demo-bar select { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-soft); }
.demo-bar .btn.light, .acct-fixed { color: var(--text-secondary); } .demo-bar .btn.light:hover { background: var(--border-subtle); color: var(--text-primary); }

/* Navigation : fond clair, numéros discrets, repère pastel contextuel (aucun bloc foncé) */
.nav-item { color: var(--text-primary); }
.nav-n { color: var(--text-muted); }
.nav-item.active .nav-n { color: var(--ctx-ink, var(--text-secondary)); }
.nav-item.active.ctx-plain { background: var(--c-plain); }
.nav-item:hover { background: var(--bg-surface-soft); }
.nav-badge { background: var(--status-open-bg); color: var(--status-open-text); font-weight: 600; }
.nav-foot { color: var(--text-secondary); }
@media (max-width: 959px) { .nav-item { color: var(--text-secondary); } .nav-item.active { background: color-mix(in srgb, var(--ctx) 60%, transparent); } }

/* Texte et filets : contrastes doux */
.muted, .page-head p, .kpi-sub { color: var(--text-secondary); }
.kpi { border-top: 1px solid var(--rule); }
.kpi-ok { border-top: 2px solid var(--context-professional-strong); } .kpi-warn { border-top: 2px solid var(--context-planning-strong); } .kpi-danger { border-top: 2px solid #C99189; }
.table thead th { border-bottom: 1px solid var(--rule); }
.role-grid { border-top: 1px solid var(--rule); }

/* Grande zone « Prochaine mission » : pastel de contexte, jamais de masse sombre */
.main > .card.hero, .main > section.card.hero, .hero { background: var(--context-mission); color: var(--text-primary); }
.hero .eyebrow { color: var(--c-missions-ink); } .hero-time { color: var(--c-missions-ink); } .hero-title { color: var(--text-primary); } .hero-sub { color: var(--text-secondary); }
.hero .badge-brand, .hero-rate, .hero-rate.big { background: rgba(252, 251, 248, .65); color: var(--text-primary); }

/* Boutons : l'action principale seule est foncée, en bleu pétrole doux */
.btn-primary { background: var(--brand-dark); color: var(--bg-surface); } .btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { color: var(--text-primary); border-color: var(--border-soft); background: transparent; }
.btn-light { background: var(--bg-surface); color: var(--text-primary); }

/* Blocs regroupés : surface claire, bordure fine, aucune ombre */
.card { background: var(--bg-surface); border-color: var(--border-soft); box-shadow: none; }
.pay-block, .kcard, .cand, .blk { background: var(--bg-surface); }
.kcol { background: var(--bg-surface-soft); }
.badge-neutral, .mc-neutral { background: var(--bg-surface-soft); color: var(--text-secondary); }
.notice-neutral { background: var(--bg-surface-soft); color: var(--text-secondary); }
.toast { background: var(--text-primary); color: var(--bg-surface); }
dialog { background: var(--bg-surface); color: var(--text-primary); }
dialog::backdrop { background: rgba(32, 36, 39, .32); }
.avatar { background: hsl(var(--h) 22% 88%); color: hsl(var(--h) 30% 28%); } .logo { background-color: hsl(var(--h) 20% 90%); color: hsl(var(--h) 28% 28%); }
input, select, textarea { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-soft); }
.sb-ok { background: var(--context-professional-strong); } .sb-info { background: var(--context-mission-strong); } .sb-warn { background: var(--context-planning-strong); }
.dot-warn { background: var(--context-planning-strong); } .dot-info { background: var(--context-mission-strong); } .dot-danger { background: #C99189; }
.stackbar { background: var(--bg-surface-soft); border-color: var(--border-soft); }

/* =====================================================================================================
   DOSSIER À RUBRIQUES — lecture progressive (dossier papier / intercalaires Swiss) : U.dossier(...)
   Un cartouche coloré (texte blanc) + une ligne de synthèse ; le détail s'ouvre au clic ou au centre de la lecture.
   Petits repères colorés seulement : aucun grand aplat foncé.
   ===================================================================================================== */
.tone-mission { --tone: #4A6E82; } .tone-desc { --tone: #5B7487; } .tone-docs { --tone: #7A6F58; } .tone-check { --tone: #60727B; } .tone-day { --tone: #6F6B5E; }
.tone-letter { --tone: #8A6540; } .tone-req { --tone: #5C7C63; } .tone-time { --tone: #4C7263; } .tone-alert { --tone: #8C5B54; }

.dossier { display: grid; gap: 1.2rem; align-items: start; }
.dos-list { min-width: 0; }
/* navigation locale : rail sticky (bureau), bande horizontale défilante (mobile) */
.dos-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.dos-link { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr) auto; align-items: center; width: 100%; text-align: left; font: inherit; font-size: .9rem; color: var(--text-secondary); background: transparent; border: 0; border-radius: 8px; padding: .55rem .6rem; cursor: pointer; min-height: 40px; transition: background .15s, color .15s, box-shadow .15s; }
.dos-link:hover { background: var(--bg-surface-soft); color: var(--text-primary); }
.dos-link.on { background: color-mix(in srgb, var(--tone) 12%, var(--bg-surface)); color: var(--text-primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--tone); }
.dos-n { font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: var(--text-muted); font-variant-numeric: tabular-nums; } .dos-link.on .dos-n { color: var(--tone); }
.dos-flag, .rub-flag { width: 8px; height: 8px; border-radius: 50%; background: var(--context-planning-strong); flex: none; display: inline-block; }
@media (min-width: 1000px) {
  .dossier { grid-template-columns: 232px minmax(0, 1fr); gap: 2.6rem; }
  .dos-rail { position: sticky; top: 5rem; }
}
@media (max-width: 999px) {
  .dos-rail { position: sticky; top: 0; z-index: 30; background: var(--bg-page); padding: .5rem 0; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dos-rail::-webkit-scrollbar { display: none; }
  .dos-rail ol { display: flex; gap: .4rem; width: max-content; }
  .dos-link { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; width: auto; white-space: nowrap; border: 1px solid var(--border-soft); border-radius: 99px; padding: .35rem .85rem; min-height: 36px; font-size: .84rem; }
  .dos-n { display: none; }
  .dos-link.on { box-shadow: none; background: var(--tone); color: #fff; border-color: var(--tone); } .dos-link.on .dos-flag { background: #fff; }
  .rub { scroll-margin-top: 4rem; }
}
/* rubrique */
.rub { background: var(--bg-surface); border: 1px solid var(--border-soft); border-left: 3px solid var(--tone); border-radius: var(--radius); margin: 0 0 .65rem; scroll-margin-top: 5rem; transition: border-color .2s, background .2s; }
.rub.is-open { border-color: color-mix(in srgb, var(--tone) 30%, var(--border-soft)); border-left-color: var(--tone); }
.rub-h { margin: 0; font-size: inherit; letter-spacing: 0; }
.rub-bar { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 56px; padding: .6rem 1rem .6rem .8rem; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; }
.rub-bar:hover { background: color-mix(in srgb, var(--tone) 5%, transparent); }
.rub-tab { flex: none; min-width: 10.5rem; background: var(--tone); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; padding: .45rem .8rem; border-radius: 6px; }
.rub-sum { flex: 1; min-width: 0; color: var(--text-secondary); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rub.is-open .rub-sum { color: var(--text-muted); }
.rub-chev { flex: none; width: 8px; height: 8px; margin: 0 .3rem 3px 0; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; }
.rub.is-open .rub-chev { transform: rotate(-135deg); margin-bottom: -3px; }
.rub-body { padding: .6rem 1.6rem 1.6rem 1.1rem; border-top: 1px solid var(--border-subtle); margin: 0 .8rem 0 .8rem; padding-left: .2rem; padding-right: .2rem; }
.rub-body[hidden] { display: none; }
.rub-in { animation: rub-in .24s ease-out; } @keyframes rub-in { from { opacity: 0; transform: translateY(-4px); } }
.rub-body > .dl { margin-top: .9rem; } .rub-body > p:first-child { margin-top: .9rem; }
.rub-body .list { margin-top: .6rem; } .rub-body .btn-row { margin-top: 1rem; }
@media (max-width: 640px) {
  .rub-bar { flex-wrap: wrap; gap: .35rem .8rem; padding-right: 2.2rem; position: relative; } .rub-tab { min-width: 0; }
  .rub-sum { flex: 1 1 100%; order: 3; white-space: normal; } .rub-chev { position: absolute; right: 1rem; top: 1.35rem; margin: 0; } .rub.is-open .rub-chev { margin: 0; top: 1.5rem; }
  .rub-body { margin: 0 .6rem; }
}
.dos-list { padding-bottom: 14vh; } /* laisse les dernières rubriques atteindre la ligne de lecture */
.rub-bar:focus-visible, .dos-link:focus-visible { outline: 2px solid var(--tone, var(--brand)); outline-offset: -2px; }
@media (max-width: 640px) { .rub.is-open .rub-sum { display: none; } }

/* =====================================================================================================
   V1 ARCHITECTURE PRODUIT — identité unique, espaces, droits ; Missions · Stages · Jobs ; parcours étudiant → professionnel
   (mêmes jetons Swiss Editorial : thème clair, filets fins, pastels de contexte, peu de cartes)
   ===================================================================================================== */
/* --- Sélecteur d'espace : dans la barre latérale (bureau) ou sous l'en-tête (mobile) --- */
.space-switch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 .5rem; text-align: left; font: inherit; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: .65rem .85rem; cursor: pointer; width: 100%; transition: border-color .15s, background .15s; }
.space-switch:hover { border-color: var(--rule); background: var(--bg-surface-soft); }
.ss-eyebrow { grid-column: 1 / -1; font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.ss-name { font-size: 1.02rem; font-weight: 600; letter-spacing: -.015em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-sub { grid-column: 1; font-size: .76rem; color: var(--text-secondary); line-height: 1.35; margin-top: .1rem; }
.ss-chev { grid-row: 2 / span 2; grid-column: 2; transform: rotate(90deg); color: var(--text-muted); }
.space-switch.in-nav { margin: 0 0 1.4rem; } .space-switch.in-bar { display: none; margin: 0 0 1.2rem; }
@media (max-width: 959px) { .space-switch.in-nav { display: none; } .space-switch.in-bar { display: grid; } }
.space-group { display: grid; gap: .35rem; } .space-label { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-top: .5rem; }
.space-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: .7rem .9rem; cursor: pointer; }
.space-item:hover { background: var(--bg-surface-soft); } .space-item.is-current { background: var(--c-plain); border-color: transparent; }
.si-main { display: grid; gap: .1rem; min-width: 0; }
.chip-r { display: inline-block; font-size: .72rem; font-weight: 600; padding: .16rem .55rem; border-radius: 6px; background: var(--bg-surface-soft); color: var(--text-secondary); white-space: nowrap; }
.chips .chip-r { margin: 0 .3rem .3rem 0; }

/* --- Barre de démo : identité de démonstration --- */
.bar-as { font-size: .72rem; letter-spacing: .04em; margin-right: .5rem; color: var(--text-muted); } .bar-acct { display: flex; align-items: center; }
@media (max-width: 639px) { .bar-as { display: none; } }

/* --- Accueil de démonstration et choix d'espace --- */
.landing h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 24ch; margin-top: 2.2rem; }
.landing-h { margin: 2.4rem 0 1rem; } .landing-h .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pillars { display: grid; gap: 0 1.6rem; grid-template-columns: 1fr; border-top: 1px solid var(--rule); } @media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { display: grid; gap: .35rem; padding: 1.1rem .1rem 1.3rem; align-content: start; border-bottom: 1px solid var(--border-subtle); } .pillar strong { font-size: 1.45rem; font-weight: 600; letter-spacing: -.025em; }
.pillar-tag { justify-self: start; font-size: .66rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 5px; background: var(--status-open-bg); color: var(--status-open-text); }
.pillar.is-free .pillar-tag, .pillar-link .pillar-tag { background: var(--status-success-bg); color: var(--status-success-text); } .pillar-tag.soft { background: var(--bg-surface-soft); color: var(--text-secondary); }
.chooser-eyebrow { display: block; margin-top: 2.6rem; color: var(--text-muted); }
.space-list { display: grid; border-top: 1px solid var(--rule); margin: 0 0 1.6rem; }
.space-row { display: grid; grid-template-columns: 2.6rem 1fr auto auto; align-items: center; gap: .6rem 1rem; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--border-soft); padding: 1.5rem .3rem; cursor: pointer; transition: background .15s; }
.space-row:hover { background: var(--c-plain); } .sr-main { display: grid; gap: .15rem; } .sr-main strong { font-size: 1.6rem; font-weight: 600; letter-spacing: -.025em; } .sr-tags { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
@media (max-width: 640px) { .space-row { grid-template-columns: 2rem 1fr auto; } .sr-tags { grid-column: 2 / -1; justify-content: flex-start; } .sr-main strong { font-size: 1.3rem; } }

/* --- Navigation : étiquettes d'offre, défilement quand il y a beaucoup de rubriques (mobile) --- */
.nav-tag { font-size: .6rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; margin-left: .45rem; padding: .08rem .38rem; border-radius: 4px; background: var(--status-success-bg); color: var(--status-success-text); vertical-align: middle; }
@media (max-width: 959px) { .nav-tag { display: none; } .shell-many .nav { overflow-x: auto; scrollbar-width: none; } .shell-many .nav::-webkit-scrollbar { display: none; } .shell-many .nav-item { flex: 0 0 auto; min-width: 76px; padding-inline: .5rem; } }

/* --- Chiffres-repères des modules (accueils) --- */
.pillar-row { display: grid; gap: 0 1.6rem; grid-template-columns: repeat(2, 1fr); margin-bottom: .4rem; } @media (min-width: 720px) { .pillar-row { grid-template-columns: repeat(4, 1fr); } }
.pillar-link { display: grid; gap: .2rem; align-content: start; text-decoration: none; color: inherit; border-top: 1px solid var(--rule); padding: .8rem 0 1.2rem; transition: border-color .15s; } .pillar-link:hover { border-top-color: var(--brand); }
.pillar-n { font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; } .pillar-l { font-size: .86rem; color: var(--text-secondary); } .pillar-link .pillar-tag { margin-top: .3rem; }
.sec-h { margin: 2rem 0 .8rem; }

/* --- Parcours : étudiant → diplômé → professionnel --- */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.journey li { display: grid; gap: .1rem; padding: .8rem .8rem 1rem 0; border-top: 3px solid transparent; margin-top: -1px; color: var(--text-muted); }
.jn-n { font-size: .66rem; font-weight: 600; letter-spacing: .1em; } .jn-l { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; } .journey small { font-size: .76rem; line-height: 1.35; }
.journey li.done { color: var(--text-secondary); border-top-color: var(--context-professional-strong); } .journey li.current { color: var(--text-primary); border-top-color: var(--c-pros-ink); } .journey li.current .jn-n { color: var(--c-pros-ink); }
.journey-sm li { padding-top: .6rem; } .journey-sm .jn-l { font-size: .95rem; }
@media (max-width: 560px) { .journey small { display: none; } .journey li.current small { display: block; } }
.ds { display: grid; gap: 1rem 2rem; margin-bottom: 1.6rem; } @media (min-width: 800px) { .ds:not(.ds-top) { grid-template-columns: 11rem 1fr; } }
.ds-pct { display: grid; gap: .3rem; align-content: start; } .ds-pct .kpi-value { margin: 0; } .ds-body { display: grid; gap: .9rem; min-width: 0; } .ds-top { margin-bottom: 1rem; }
.usage { display: grid; gap: 0 1.6rem; grid-template-columns: 1fr; margin-bottom: 1.6rem; } @media (min-width: 800px) { .usage { grid-template-columns: repeat(3, 1fr); } }
.usage > div { display: grid; gap: .25rem; padding: .7rem 0 .9rem; border-top: 1px solid var(--border-soft); } .usage strong { font-weight: 500; font-size: .9rem; color: var(--text-secondary); line-height: 1.4; }

/* --- Stages, jobs, avantages --- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem 1.6rem; margin: 0 0 1.6rem; } @media (min-width: 800px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts > div { border-top: 1px solid var(--rule); padding: .7rem 0 .4rem; } .facts dt { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); } .facts dd { margin: .2rem 0 0; font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.pswitch { display: inline-flex; background: var(--bg-surface-soft); border-radius: 8px; padding: 2px; } .pswitch a { text-decoration: none; color: var(--text-secondary); font-size: .88rem; font-weight: 500; padding: .5rem .9rem; border-radius: 6px; min-height: 38px; display: inline-flex; align-items: center; }
.pswitch a.on { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border-soft); font-weight: 600; }
.perks { display: grid; gap: 0 2rem; grid-template-columns: 1fr; margin-bottom: 1.4rem; } @media (min-width: 800px) { .perks { grid-template-columns: repeat(2, 1fr); } }
.perk { display: grid; gap: .3rem; padding: 1.1rem 0 1.3rem; border-top: 1px solid var(--rule); } .perk strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; } .perk.is-muted { opacity: .55; }
.perk-cat { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-finance-ink); }
.tabs a.tab { text-decoration: none; display: inline-flex; align-items: center; }
.app-line { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .15rem 0; }

/* --- Organisation → membres → droits --- */
.org-head { margin: 0 0 1.4rem; } .org-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; }
.rights-legend { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: 0; } .rights-legend li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.journey-sm.journey { margin: 0; }
.pillar-link .pillar-tag.paid, .nav-tag.paid, .pillar.paid .pillar-tag { background: var(--status-open-bg); color: var(--status-open-text); }
.bar-as { white-space: nowrap; }

/* =====================================================================================================
   MODULE MISSIONS V1 — mission critique (tabac / orange), compte à rebours, couverture, formulaire en sections
   ===================================================================================================== */
.crit-tag { display: inline-flex; align-items: baseline; gap: .5rem; padding: .22rem .6rem; border-radius: 6px; background: var(--status-open-bg); color: var(--status-open-text); font-size: .78rem; }
.crit-w { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .66rem; color: var(--status-open-text); } .crit-t { font-variant-numeric: tabular-nums; font-weight: 600; }
.mk-card.is-critical, .ann-head.is-critical { border-left: 3px solid var(--context-planning-strong); background: color-mix(in srgb, var(--context-planning) 35%, var(--bg-surface)); }
.mk-card.is-critical .kc-top strong { font-size: 1.05rem; }
.expiry { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-secondary); font-size: .82rem; } .expiry.is-soon { color: var(--status-open-text); }
.cand-off { opacity: .72; } .cand-time { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
details.closed-apps { padding: .9rem 1.1rem; } details.closed-apps summary { cursor: pointer; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); } details.closed-apps[open] summary { margin-bottom: .6rem; }
.cover { height: 6px; border-radius: 99px; background: var(--bg-surface-soft); overflow: hidden; margin: .5rem 0 .2rem; } .cover span { display: block; height: 100%; background: var(--context-professional-strong); border-radius: 99px; } .cover-lg { height: 8px; margin: 0 0 1.4rem; }
.form-sec { display: flex; align-items: baseline; gap: .7rem; margin: 1.6rem 0 .2rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); font-size: .72rem; } .form-sec .role-n { font-size: .75rem; }
.md-row { display: flex; gap: .4rem; margin-bottom: .4rem; align-items: center; } .md-row input { max-width: 240px; }
.wds { gap: .3rem; } .check.wd { min-height: 0; padding: .3rem .7rem; border: 1px solid var(--border-soft); border-radius: 99px; gap: .4rem; font-size: .84rem; } .check.wd:has(input:checked) { background: var(--context-mission); border-color: transparent; } .check.wd input { width: 16px; height: 16px; }
.cv-grid { display: grid; gap: .25rem; margin: .4rem 0 .8rem; max-width: 520px; } .cv-row { display: grid; grid-template-columns: 3.2rem repeat(7, 1fr); gap: .25rem; align-items: center; } .cv-head span { font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.cv-wk { font-size: .72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cv-cell { height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 600; } .cv-on, .cv-sw.cv-on { background: var(--context-professional); color: var(--c-pros-ink); } .cv-open, .cv-sw.cv-open { background: var(--context-planning); color: var(--c-planning-ink); box-shadow: inset 0 0 0 1px var(--context-planning-strong); } .cv-off, .cv-sw.cv-off { background: transparent; box-shadow: inset 0 0 0 1px var(--border-subtle); }
.cv-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--text-secondary); } .cv-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: .3rem; }
.slots { display: grid; gap: .8rem; } .slots h3 { margin: .2rem 0 0; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }
.fee-in { max-width: 120px; } .need-card .mid { margin-bottom: .1rem; }
.ann-head { margin-bottom: 1.2rem; } .ann-head .facts { margin-bottom: 1rem; }

/* ===== Dossier professionnel & conformité V1 — synthèse d'agrément, couches, registres (Swiss Editorial, thème clair) ===== */
.eyebrow { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.agr { display: grid; gap: 1.2rem 2.4rem; grid-template-columns: 1fr; padding: 1.1rem 0 1.4rem; margin-bottom: 1.4rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--border-soft); }
@media (min-width: 900px) { .agr { grid-template-columns: 1.1fr 1.4fr 1fr; } }
.agr-state { display: flex; align-items: center; gap: .55rem; font-size: 1.7rem; font-weight: 500; letter-spacing: -.02em; margin: .3rem 0 .2rem; }
.agr-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--text-muted); flex: none; }
.agr-ok .agr-dot { background: var(--ok); } .agr-warn .agr-dot { background: #B7873F; } .agr-danger .agr-dot { background: #A8645A; } .agr-info .agr-dot { background: var(--brand); }
.agr-layers, .agr-rights ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; } .agr-layers { margin: 0 0 .6rem; }
.agr-layers li, .agr-rights li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--border-subtle); font-size: .95rem; }
.agr-layers li:first-child, .agr-rights li:first-child { border-top: 0; }
.lay-v { text-align: right; color: var(--text-secondary); } .lay-v.is-ok { color: var(--ok); font-weight: 500; } .lay-v.is-no { color: var(--warn); font-weight: 500; } .lay-v.is-warn { color: var(--warn); font-weight: 500; }
.agr-rights .eyebrow { margin-bottom: .35rem; }
.cpd { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: end; margin: .2rem 0 .8rem; } .cpd-n strong { font-size: 2.6rem; font-weight: 400; letter-spacing: -.03em; line-height: 1; } .cpd-n span { color: var(--text-secondary); font-size: 1.1rem; }
.cpd-m { display: grid; gap: .35rem; }
.months { list-style: none; margin: .4rem 0 1rem; padding: 0; } .months li { display: grid; grid-template-columns: 9rem 5rem 1fr; gap: .2rem 1rem; padding: .7rem 0; border-top: 1px solid var(--border-soft); align-items: baseline; }
.months .mo-n { font-size: .72rem; font-weight: 600; letter-spacing: .1em; } .months .mo-h { color: var(--text-secondary); } .months .mo-a { font-size: 1.1rem; font-weight: 500; text-align: right; } .months .mo-m { grid-column: 1 / -1; }
@media (max-width: 600px) { .months li { grid-template-columns: 1fr auto; } .months .mo-n { grid-column: 1 / -1; } .months .mo-h { grid-column: 1; } .cpd { grid-template-columns: 1fr; } }
.standby { border: 1px solid var(--border-soft); background: var(--bg-surface-soft); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.2rem; display: grid; gap: .6rem; } .standby-h { display: grid; gap: .1rem; } .standby-h strong { font-weight: 500; font-size: 1.05rem; }
.decl { margin: 0 0 .8rem; padding: .8rem 1rem; border-left: 3px solid var(--rule); background: var(--bg-surface-soft); } .decl p { margin: .4rem 0; font-size: 1.02rem; }
.issues { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .25rem; font-size: .92rem; color: var(--warn); } .issues li::before { content: "– "; } .issues.ok { color: var(--text-secondary); }
.chips-l { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .92rem; }
.rule { border-top: 1px solid var(--border-soft); margin: 1.3rem 0; } .fs-h { margin: .8rem 0 .3rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.mb { margin-bottom: 1.2rem; }
@media (max-width: 600px) { .cvlist li { flex-wrap: wrap; } .cvlist li > div:first-child { flex: 1 1 100%; } }

/* Espace coloré selon le profil (badges officiels) */
.space-switch.st-dip { background: #0068C9; border-color: #0068C9; color: #fff; } .space-switch.st-tech { background: #0B802B; border-color: #0B802B; color: #fff; } .space-switch.st-etu { background: #7B0B87; border-color: #7B0B87; color: #fff; }
.space-switch.st-white { background: #fff; border-color: var(--border-soft); color: var(--text-primary); }
.space-switch.st-cadre { background: #0F0E00; border-color: #0F0E00; border-left: 5px solid #F7B900; color: #fff; } .space-switch.st-med { background: #BD1E06; border-color: #BD1E06; color: #fff; } .space-switch.st-adm { background: #D46E00; border-color: #D46E00; color: #fff; }
.space-switch.st-dip:hover, .space-switch.st-tech:hover, .space-switch.st-etu:hover, .space-switch.st-cadre:hover, .space-switch.st-med:hover, .space-switch.st-adm:hover { filter: brightness(1.1); }
.space-switch.st-dip .ss-eyebrow, .space-switch.st-tech .ss-eyebrow, .space-switch.st-etu .ss-eyebrow, .space-switch.st-cadre .ss-eyebrow, .space-switch.st-med .ss-eyebrow, .space-switch.st-adm .ss-eyebrow,
.space-switch.st-dip .ss-sub, .space-switch.st-tech .ss-sub, .space-switch.st-etu .ss-sub, .space-switch.st-cadre .ss-sub, .space-switch.st-med .ss-sub, .space-switch.st-adm .ss-sub,
.space-switch.st-dip .ss-chev, .space-switch.st-tech .ss-chev, .space-switch.st-etu .ss-chev, .space-switch.st-cadre .ss-chev, .space-switch.st-med .ss-chev, .space-switch.st-adm .ss-chev { color: rgba(255, 255, 255, .85); }

/* ===== Stages V1 — couverture par volée, photos d'offre (teinte « planning » existante, aucune nouvelle palette) ===== */
.cov { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0 1.4rem; margin: .6rem 0 1.2rem; border-top: 1px solid var(--rule); }
.cov > div { padding: .7rem 0 .5rem; display: grid; gap: .15rem; } .cov b { font-size: 2rem; font-weight: 400; letter-spacing: -.03em; line-height: 1; } .cov span { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.cov .is-gap b { color: var(--warn); } .big-line { font-size: 1.15rem; margin: .4rem 0; } .big-line strong { font-size: 1.6rem; font-weight: 500; letter-spacing: -.02em; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .6rem; margin: .8rem 0; } .photos figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-surface-soft); aspect-ratio: 4 / 3; } .photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.facts-box { margin: 0 0 1rem; }

.change-block { border-left: 3px solid #B7873F; background: var(--bg-surface); } .change-block .table td:last-child { color: var(--text-primary); }

/* ===== Jobs V1 — formulaire d'offre, pièces demandées, indication de vérification (sobre, aucune nouvelle palette) ===== */
.jobform .card { margin-bottom: 1rem; } .req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem 1.2rem; } .req-sel { display: grid; gap: .2rem; font-size: .9rem; } .req-sel select { width: 100%; }
.req-row { border-top: 1px solid var(--border-soft); padding: .6rem 0 .4rem; } .req-row:first-of-type { border-top: 0; } .field-inline { display: grid; gap: .25rem; font-size: .85rem; color: var(--text-secondary); margin-top: .4rem; }
.ok-tag { color: var(--ok); font-size: .82rem; font-weight: 500; margin-left: .3rem; } .item-side { display: flex; align-items: center; gap: .5rem; flex: none; }
@media (max-width: 600px) { .jobtools { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; } .jobtools .jt-q { grid-column: 1 / -1; } .jobtools .field { margin: 0; } .jobtools label { font-size: .7rem; } }
@media (max-width: 600px) { .jobtools .field { min-width: 0; } .jobtools select, .jobtools input { width: 100%; min-width: 0; } .item-wrap { flex-wrap: wrap; } .item-wrap .item-main { flex: 1 1 100%; min-width: 0; } .item-wrap .item-side { margin-top: .4rem; } }

/* ===== Organisations & équipes V1 : membre = badge noir ; SuperUser = badge noir + bande jaune latérale ===== */
.space-switch.st-member { background: #0F0E00; border-color: #0F0E00; color: #fff; } .space-switch.st-super { background: #0F0E00; border-color: #0F0E00; border-left: 5px solid #F7B900; color: #fff; }
.space-switch.st-member:hover, .space-switch.st-super:hover { filter: brightness(1.1); }
.space-switch.st-member .ss-eyebrow, .space-switch.st-super .ss-eyebrow, .space-switch.st-member .ss-sub, .space-switch.st-super .ss-sub, .space-switch.st-member .ss-chev, .space-switch.st-super .ss-chev { color: rgba(255, 255, 255, .85); }
.mbadge { display: inline-block; background: #0F0E00; color: #fff; font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 4px; }
.mem { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; padding: .9rem 1rem .9rem .9rem; border-top: 1px solid var(--border-soft); border-left: 5px solid transparent; align-items: start; } .mem.mem-super { border-left-color: #F7B900; background: var(--bg-surface-soft); }
.mem-main { display: grid; gap: .25rem; min-width: 0; } .mem-main strong { font-size: 1.02rem; } .mem-chips { display: flex; flex-wrap: wrap; gap: .3rem; } .mem-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.team { background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; } .team .mem:first-child { border-top: 0; }
/* titre professionnel en validation : voilé, contour pointillé */
.tchip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .85rem; font-weight: 500; border: 1px solid transparent; }
.tchip.is-pending { background: transparent; border: 1.5px dashed var(--rule); color: var(--text-secondary); opacity: .75; } .tchip small { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.tchips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.bg-box { border: 1.5px dashed var(--rule); border-radius: var(--radius); padding: .9rem 1rem; background: var(--bg-surface-soft); } .bg-box.is-open { border-style: solid; border-color: #B7873F; }
