/* Splash Équipe — composants partagés, sans dépendance réseau. */
:root {
  color-scheme: light;
  --ink:#202624; --muted:#586660; --line:#dce2dd; --soft-line:#e9ede9;
  --page:#f5f7f4; --paper:#fff; --quiet:#eff3ee;
  --orange:#ff6a00; --orange-hover:#ff7a20; --orange-strong:#9c3d00;
  --orange-soft:#fff0e3; --green:#24634b; --green-soft:#e5f3e9;
  --amber:#79500b; --amber-soft:#fff1d2; --red:#98362d; --red-soft:#ffedeb;
  --nav-width:242px; --gutter:clamp(16px,2.8vw,44px); --radius:14px;
  --shadow:0 4px 20px rgb(28 45 33 / .035);
  --font:Inter,"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
*,*::before,*::after { box-sizing:border-box }
html { text-size-adjust:100%; -webkit-text-size-adjust:100%; scroll-padding-top:75px }
body { margin:0; min-width:0; min-height:100vh; color:var(--ink); background:var(--page); font:400 15px/1.48 var(--font); -webkit-font-smoothing:antialiased }
button,input,select,textarea { font:inherit; color:inherit }
button,a { -webkit-tap-highlight-color:transparent; touch-action:manipulation }
button { cursor:pointer }
a { color:var(--orange-strong); text-underline-offset:3px }
a:hover { text-decoration-thickness:2px }
img,svg { max-width:100% }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid #9d4100; outline-offset:3px }
[hidden] { display:none!important }
:disabled,[aria-disabled="true"] { opacity:.55; cursor:not-allowed }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0 }
.skip-link { position:fixed; top:4px; left:4px; transform:translateY(-150%); padding:10px 15px; background:white; z-index:100 }
.skip-link:focus { transform:none }
.icon { width:1.16em; height:1.16em; flex:none; vertical-align:-.2em; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
.app-shell { min-height:100vh; min-height:100dvh }
.workspace { min-width:0 }
.sidebar { display:none }
.brand,.brand:hover { display:inline-flex; align-items:center; gap:9px; color:var(--ink); font-weight:780; letter-spacing:-.055em; font-size:20px; line-height:1; text-decoration:none; white-space:nowrap }
.brand-mark { display:inline-grid; place-content:center; flex:0 0 auto; width:32px; height:32px; overflow:hidden; background:var(--orange); color:var(--ink); border-radius:10px }
.brand-mark .icon { width:23px; height:23px }
.brand-sub { color:var(--muted); margin-inline-start:3px; padding-inline-start:10px; border-inline-start:1px solid var(--line); font-weight:530; font-size:.7em; letter-spacing:-.025em }
.nav-list { display:grid; align-content:start; gap:4px; margin:0; padding:0; list-style:none }
.nav-link,.tab-link { border:0; background:transparent; color:var(--muted); text-decoration:none; text-align:start; font-weight:550 }
.nav-link { display:flex; align-items:center; gap:10px; width:100%; padding:11px 12px; border-radius:9px; font-size:14px; line-height:1.35 }
.nav-link .icon { width:18px; height:18px }
.nav-link:hover,.tab-link:hover { color:var(--ink); background:var(--quiet) }
.nav-link[aria-current="page"],.nav-link.active,.tab-link[aria-current="page"],.tab-link.active { color:var(--orange-strong); background:var(--orange-soft); font-weight:680 }
.nav-foot { margin-top:auto; padding-top:16px; border-top:1px solid var(--line) }
.nav-caption { margin:17px 0 6px 12px; font-size:12px; font-weight:590; color:var(--muted) }
.topbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; min-height:62px; padding:10px var(--gutter); background:var(--paper); border-bottom:1px solid var(--line) }
.topbar .brand { font-size:18px }
.topbar .brand-mark { width:29px; height:29px; border-radius:9px }
.topbar-left,.topbar-right,.toolbar,.actions,.inline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0 }
.crumb { color:var(--muted); font-size:13px; font-weight:550 }
.crumb strong { color:var(--ink) }
.scope { display:inline-flex; align-items:center; gap:8px; max-width:100%; line-height:1.3; font-size:13px; font-weight:630; background:white; border:1px solid var(--line); border-radius:8px; padding:7px 10px }
.avatar { display:inline-grid; place-items:center; flex:none; width:33px; height:33px; border-radius:50%; background:#e1eae3; color:#32523e; font-weight:680; font-size:12px; letter-spacing:.01em }
.avatar-warm { color:#974a19; background:#ffe5cf }
.bottom-nav { position:fixed; z-index:19; bottom:0; inset-inline:0; display:flex; justify-content:space-around; gap:2px; padding:5px 5px calc(5px + env(safe-area-inset-bottom,0px)); min-height:61px; background:var(--paper); border-top:1px solid var(--line); box-shadow:0 -2px 11px rgb(22 31 23 / .03) }
.tab-link { flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:5px 2px; border-radius:9px; font-size:clamp(10px,2.6vw,12px); text-align:center; line-height:1.2 }
.tab-link .icon { height:19px; width:19px }
.page { width:min(100%,1530px); margin:0 auto; padding:clamp(21px,3vw,43px) var(--gutter) calc(85px + env(safe-area-inset-bottom,0px)) }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:21px }
.page-head h1,.dialog-head h2 { margin:0; font-size:clamp(26px,3vw,37px); letter-spacing:-.052em; font-weight:740; line-height:1.13; text-wrap:balance }
.page-head p { margin:6px 0 0; color:var(--muted); max-width:69ch }
.page-head .context { margin:0 0 6px; color:var(--orange-strong); font-size:12px; font-weight:650; letter-spacing:.02em }
.section-title { margin:0 0 12px; font-size:18px; letter-spacing:-.035em; line-height:1.2 }
.muted,.help { color:var(--muted) }
.help { font-size:12px; font-weight:400 }
.stack,.card-list { display:grid; gap:14px; min-width:0 }
.stack-tight { display:grid; gap:7px }
.grid-2,.split { display:grid; gap:16px; grid-template-columns:minmax(0,1fr); align-items:start }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr)); gap:10px; margin:0 0 18px }
.kpi,.panel,.card { min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); box-shadow:var(--shadow) }
.kpi { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:13px 15px; gap:5px; min-height:91px }
.kpi-label { color:var(--muted); font-weight:560; font-size:12px }
.kpi-value,.metric { font-variant-numeric:tabular-nums; font-size:clamp(23px,2.6vw,34px); font-weight:720; letter-spacing:-.055em; line-height:1.1 }
.kpi-foot { font-size:11px; color:var(--muted) }
.kpi-accent { background:var(--orange-soft); border-color:#f1d0ae }
.kpi-accent .kpi-label { color:var(--orange-strong) }
.panel { overflow:clip }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 18px; border-bottom:1px solid var(--soft-line); flex-wrap:wrap }
.panel-head h2,.panel-head h3,.card h2,.card h3 { margin:0; font-size:17px; font-weight:680; line-height:1.25; letter-spacing:-.036em }
.panel-body,.card { padding:17px 18px }
.panel-foot { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 18px; border-top:1px solid var(--soft-line); color:var(--muted); font-size:12px }
.card-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--soft-line); min-width:0 }
.card-row:last-child { border-bottom:0 }
.row-title { font-weight:630; color:var(--ink) }
.row-detail { display:block; color:var(--muted); font-size:12px }
.chip { display:inline-flex; align-items:center; justify-content:center; gap:5px; width:fit-content; max-width:100%; padding:4px 9px; border-radius:999px; background:var(--quiet); color:#405149; font-size:11px; font-weight:650; line-height:1.35; vertical-align:middle }
.chip-ok,.chip-success { background:var(--green-soft); color:var(--green) }
.chip-warn,.chip-warning { background:var(--amber-soft); color:var(--amber) }
.chip-danger,.chip-error { background:var(--red-soft); color:var(--red) }
.chip-accent { background:var(--orange-soft); color:var(--orange-strong) }
.chip .icon { width:13px; height:13px }
.btn,.icon-btn { display:inline-flex; align-items:center; justify-content:center; min-height:42px; max-width:100%; gap:8px; border:1px solid var(--line); background:var(--paper); border-radius:9px; color:var(--ink); text-decoration:none; text-align:center; font-size:14px; font-weight:650; line-height:1.25; cursor:pointer; padding:9px 14px }
.btn:hover,.icon-btn:hover { background:var(--quiet); border-color:#bac7bc }
.btn-primary { background:var(--orange); border-color:var(--orange); color:#24180f }
.btn-primary:hover { background:var(--orange-hover); border-color:var(--orange-hover) }
.btn-danger { color:var(--red); border-color:#e1bcb6; background:#fff }
.btn-quiet { border-color:transparent; box-shadow:none; background:transparent }
.btn-small { min-height:34px; padding:6px 10px; font-size:12px }
.btn-block { width:100% }
.icon-btn { width:42px; height:42px; padding:0 }
.pillbar { display:flex; overflow-x:auto; max-width:100%; gap:5px; padding:4px; border-radius:9px; background:var(--quiet); width:fit-content }
.pillbar button,.pillbar a { flex:none; background:none; border:none; border-radius:6px; color:var(--muted); font-weight:600; padding:6px 11px; text-decoration:none }
.pillbar [aria-pressed="true"],.pillbar [aria-selected="true"],.pillbar .active { background:white; color:var(--ink); box-shadow:0 1px 3px rgb(30 47 34 / .1) }
.form-grid { display:grid; gap:14px; grid-template-columns:minmax(0,1fr); align-items:start }
.field { display:grid; gap:5px; min-width:0; align-content:start; font-weight:600; font-size:13px }
.field label { color:var(--ink) }
.field input:not([type="checkbox"]):not([type="radio"]),.field select,.field textarea,.input { width:100%; min-width:0; min-height:43px; border:1px solid #c4cec7; background:var(--paper); border-radius:8px; padding:9px 11px; font-size:16px; font-weight:450; line-height:1.35 }
.field textarea { min-height:88px; resize:vertical }
.field input[type="checkbox"],.field input[type="radio"] { accent-color:#a34400; width:18px; height:18px }
.field [aria-invalid="true"] { border-color:var(--red)!important }
.field-error { margin:0; font-size:12px; color:var(--red); font-weight:550 }
.field-wide,.form-actions { grid-column:1/-1 }
.form-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; align-items:center }
.table-wrap { width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch }
.table-wrap table,.data-table { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; text-align:left }
.table-wrap thead,.data-table thead { background:#f7f9f6; color:var(--muted) }
.table-wrap th,.data-table th { font-size:11px; font-weight:650; line-height:1.3 }
.table-wrap :is(td,th),.data-table :is(td,th) { padding:11px 13px; border-bottom:1px solid var(--soft-line); vertical-align:middle; white-space:nowrap }
.table-wrap tbody tr:last-child td,.data-table tbody tr:last-child td { border-bottom:0 }
.table-wrap tbody tr:hover,.data-table tbody tr:hover { background:#fafbf9 }
.num { text-align:right; font-variant-numeric:tabular-nums }
.notice { display:flex; align-items:flex-start; gap:10px; border:1px solid #f2d5ba; border-radius:9px; background:var(--orange-soft); color:var(--orange-strong); padding:11px 13px; font-size:13px }
.notice .icon { margin-top:1px }
.notice-ok { border-color:#bedfc9; background:var(--green-soft); color:var(--green) }
.notice-error { border-color:#edc6c1; background:var(--red-soft); color:var(--red) }
.empty-state { padding:28px 16px; text-align:center; color:var(--muted); max-width:42rem; margin-inline:auto }
.empty-state .icon { width:29px; height:29px; margin-bottom:5px; color:#738275 }
.empty-state strong { display:block; font-size:16px; color:var(--ink) }
.empty-state p { margin:6px 0 13px }
.timeline { list-style:none; display:grid; padding:0; margin:0 }
.timeline li { position:relative; display:grid; grid-template-columns:12px auto; column-gap:11px; padding:0 0 13px }
.timeline li::before { content:''; width:9px; height:9px; border-radius:50%; background:#a6baab; margin-top:6px }
.timeline li::after { content:''; position:absolute; left:4px; top:17px; bottom:-2px; border-inline-start:1px solid var(--line) }
.timeline li:last-child::after { display:none }
.timeline .current::before { background:var(--orange) }
.qr-card { max-width:350px; margin-inline:auto; text-align:center; background:white; border:1px solid var(--line); padding:20px; border-radius:16px }
.qr-card canvas,.qr-card img,.qr-card > svg:not(.icon) { display:block; width:min(100%,265px); height:auto; margin:10px auto; background:white; image-rendering:pixelated }
.qr-timer { font-variant-numeric:tabular-nums; color:var(--muted); font-size:13px }
.dialog { border:0; border-radius:16px; padding:0; width:min(490px,calc(100vw - 22px)); max-height:calc(100dvh - 26px); color:var(--ink); background:white; box-shadow:0 12px 60px rgb(17 31 21 / .2) }
.dialog::backdrop { background:rgb(29 36 31 / .45) }
.dialog-head,.dialog-body,.dialog-foot { padding:17px 19px }
.dialog-head,.dialog-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid var(--line) }
.dialog-head h2 { font-size:22px }
.dialog-foot { justify-content:flex-end; border-top:1px solid var(--line); border-bottom:0; flex-wrap:wrap }
.toast { position:fixed; z-index:40; bottom:calc(81px + env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100vw - 28px); background:var(--ink); color:white; border-radius:9px; padding:10px 16px; box-shadow:0 4px 15px rgb(15 26 17 / .17) }
@media(min-width:650px) {
  .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .kpi-grid { gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(100%,147px),1fr)) }
  .kpi { padding:16px 18px }
}
@media(min-width:920px) {
  .app-shell { display:grid; grid-template-columns:var(--nav-width) minmax(0,1fr) }
  .sidebar { display:flex; flex-direction:column; gap:19px; position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto; padding:25px 16px 16px; background:var(--paper); border-inline-end:1px solid var(--line) }
  .sidebar .brand { margin:0 9px 8px }
  .bottom-nav { display:none }
  .topbar { min-height:65px }
  .topbar .mobile-brand,.mobile-only { display:none!important }
  .page { padding-bottom:46px }
  .kpi-grid { margin-bottom:23px }
  .split { grid-template-columns:minmax(0,1.6fr) minmax(270px,.9fr); gap:18px }
  .toast { bottom:22px }
  .field input:not([type="checkbox"]):not([type="radio"]),.field select,.field textarea,.input { font-size:14px }
}
@media(max-width:919px) { .desktop-only { display:none!important } }
@media(max-width:390px) {
  .page-head h1 { font-size:25px }
  .topbar { padding-inline:13px }
  .brand-sub { font-size:12px; padding-inline-start:6px; margin-inline-start:0 }
  .panel-body,.card { padding:14px }
}
@media(hover:none) { .btn,.icon-btn { min-height:44px } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important } }
@media print {
  body,.workspace,.app-shell,.page { display:block; background:white; color:black }
  .sidebar,.topbar,.bottom-nav,.page-head .actions,.toast,.no-print { display:none!important }
  .page { padding:0 }
  .kpi,.panel,.card { box-shadow:none; break-inside:avoid }
  .table-wrap { overflow:visible }
}
