/* ---------- Coque ---------- */
 .app { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
 .offline-bar { background: var(--warn-soft); color: var(--warn); display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: .8125rem; font-weight: 500; }
 
 .appbar {
   flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
   min-height: calc(var(--appbar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(env(safe-area-inset-right) + 8px) 0 calc(env(safe-area-inset-left) + 16px);
   background: var(--appbar); color: #fff; border-bottom: 2px solid var(--blue);
 }
 .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
 .brand img { display: block; height: 20px; width: auto; }
 .brand-name { font-weight: 500; font-size: .875rem; letter-spacing: .02em; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .3); white-space: nowrap; }
 .appbar-actions { display: flex; align-items: center; gap: 2px; }
 .icon-btn.on-dark { color: #fff; }
 .icon-btn.on-dark:hover { background: rgba(255, 255, 255, .12); }
 
 .account-btn { border: 0; background: transparent; padding: 6px; border-radius: 50%; min-width: var(--tap); min-height: var(--tap); display: grid; place-items: center; }
 .account-btn:hover { background: rgba(255, 255, 255, .12); }
 .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: var(--navy); display: inline-grid; place-items: center; font-weight: 600; font-size: .75rem; letter-spacing: .02em; flex: none; }
 .avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
 
 .workspace { flex: 1; min-height: 0; display: flex; position: relative; }
 .listpane, .detailpane { width: 100%; height: 100%; min-width: 0; display: flex; flex-direction: column; }
 .detailpane { background: var(--bg); outline: none; }
 .listpane { background: var(--bg); }
 .listbody { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px calc(env(safe-area-inset-right) + 16px) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px) calc(env(safe-area-inset-left) + 16px); }
 
 /* TÃ©lÃ©phone : une colonne Ã  la fois, barre d'onglets en bas */
 .app[data-pane="list"] .detailpane { display: none; }
 .app[data-pane="detail"] .listpane { display: none; }
 .app[data-pane="detail"] .appbar { display: none; }
 .tabs {
   position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
   background: var(--surface); border-top: 1px solid var(--line);
 }
 .tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .6875rem; font-weight: 500; }
 .tab.active { color: var(--accent-ink); }
 .tab.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
 .tab-badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: var(--navy); font-size: .6875rem; font-weight: 600; display: grid; place-items: center; }
 
 @media (min-width: 960px) {
   .app[data-pane="list"] .detailpane, .app[data-pane="detail"] .listpane, .app[data-pane="detail"] .appbar { display: flex; }
   .listpane { width: 400px; flex: none; border-right: 1px solid var(--line); background: var(--surface-2); }
   .tabs { position: static; height: auto; padding: 8px 12px; gap: 6px; background: var(--surface); }
   .tab { flex-direction: row; justify-content: center; gap: 8px; padding: 9px 12px; font-size: .875rem; border-radius: var(--radius-sm); }
   .tab:hover { background: var(--surface-2); }
   .tab.active { background: var(--accent-soft); }
   .tab.active::before { display: none; }
   .tab-badge { position: static; }
   .listbody { padding-bottom: 24px; }
   .detailpane { flex: 1; }
 }
 
 /* ---------- Boutons et champs ---------- */
 .btn {
   display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-sm);
   border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 500; font-size: .9375rem; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s;
 }
 .btn:hover { border-color: var(--accent); }
 .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
 .btn.primary:hover { filter: brightness(1.12); }
 .btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
 .btn.quiet { border-color: transparent; background: transparent; color: var(--accent-ink); }
 .btn.quiet:hover { background: var(--accent-soft); }
 .btn.block { width: 100%; }
 .btn.lg { min-height: 52px; font-size: 1rem; }
 .btn.sm { min-height: 36px; padding: 0 12px; font-size: .8125rem; }
 .btn[disabled] { opacity: .5; cursor: default; }
 .icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); border: 0; border-radius: 50%; background: transparent; color: var(--text); text-decoration: none; }
 .icon-btn:hover { background: var(--accent-soft); }
 .icon-btn[disabled] { opacity: .4; cursor: default; }
 .link { border: 0; background: transparent; padding: 4px 0; color: var(--accent-ink); font-weight: 500; font-size: .8125rem; display: inline-flex; align-items: center; gap: 4px; }
 .link:hover { text-decoration: underline; }
 .pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; font-size: .8125rem; text-decoration: none; border: 1px solid transparent; }
 .pill.ready { background: var(--accent); color: var(--on-accent); }
 
 .field { display: block; margin-bottom: 16px; }
 .field > label, .field-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
 input[type=email], input[type=password], input[type=text], input[type=search], select, textarea {
   width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 1rem; transition: border-color .15s, box-shadow .15s;
 }
 input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
 textarea { resize: none; line-height: 1.5; }
 .input-wrap { position: relative; }
 .input-wrap input { padding-right: 52px; }
 .field-action { position: absolute; right: 2px; top: 2px; color: var(--muted); }
 .select.compact { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: .875rem; }
 .searchbox { position: relative; display: block; margin-bottom: 12px; }
 .searchbox .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
 .searchbox .search-input { padding-left: 44px; border-radius: 999px; }
 .new-discussion-box { margin-bottom: 4px; }
 .new-discussion .icon { margin-right: 8px; }
 
 /* ---------- Cartes, pastilles ---------- */
 .section-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
 section:first-child > .section-title:first-child { margin-top: 4px; }
 .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--line); color: var(--muted); font-size: .6875rem; letter-spacing: 0; }
 .card { display: block; position: relative; margin-bottom: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; box-shadow: var(--shadow); }
 a.card { transition: border-color .15s, transform .15s; }
 a.card:hover { border-color: var(--accent); }
 a.card:active { transform: scale(.995); }
 a.card[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
 .ri-card.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
 .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
 .ri-number { font-weight: 600; font-size: 1rem; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
 .card-meta { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
 .card-meta .machine { color: var(--text); font-weight: 500; }
 .card-meta .dot { margin: 0 6px; }
 .card-text { margin-top: 8px; font-size: .875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
 .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
 .chips.inline { display: inline-flex; margin: 0 0 0 6px; }
 .chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 500; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
 .chip.plain { background: var(--surface-2); color: var(--text); }
 .chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
 .chip.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
 .chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
 .chip.muted { background: var(--surface-2); color: var(--muted); }
 .chip.type { font-weight: 600; letter-spacing: .04em; border-color: transparent; }
 .chip.type-SUP { background: var(--accent-soft); color: var(--accent-ink); }
 .chip.type-ODM { background: var(--navy); color: #fff; }
 .chip.type-DEMENAGEMENT { background: var(--sand); color: #5a3b00; }
 .chip.type-PREVENTIF { background: var(--ok-soft); color: var(--ok); }
 .chip.type-CURATIF { background: var(--warn-soft); color: var(--warn); }
 .chip.type-CONTROLE { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
 :root[data-theme="dark"] .chip.type-ODM { background: #34406a; }
 .bar { height: 4px; margin-top: 12px; border-radius: 2px; background: var(--line); overflow: hidden; }
 .bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
 
 .empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 24px; text-align: center; }
 .empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 8px; }
 .empty-icon.warn { background: var(--warn-soft); color: var(--warn); }
 .empty .btn { margin-top: 12px; }
 .spinner { text-align: center; color: var(--muted); padding: 32px; }
 .skeletons .card { box-shadow: none; }
 .sk { height: 12px; border-radius: 6px; margin-bottom: 10px; background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
 .sk.w40 { width: 40%; } .sk.w70 { width: 70%; } .sk.w90 { width: 90%; }
 @keyframes shimmer { to { background-position: -200% 0; } }
 
 .notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .875rem; }
 .notice .icon { flex: none; margin-top: 2px; }
 .notice-body { flex: 1; min-width: 0; }
 .notice.error { background: var(--danger-soft); color: var(--danger); }
 .notice.warn { background: var(--warn-soft); color: var(--warn); }
 .notice.ok { background: var(--ok-soft); color: var(--ok); }
 .notice.info { background: var(--accent-soft); color: var(--accent-ink); }
 
 /* ---------- Vue dÃ©taillÃ©e ---------- */
 .view { height: 100%; display: flex; flex-direction: column; min-height: 0; }
 .viewbar { flex: none; display: flex; align-items: center; gap: 4px; padding: calc(env(safe-area-inset-top) + 6px) calc(env(safe-area-inset-right) + 8px) 6px calc(env(safe-area-inset-left) + 6px); background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px; }
 .viewbar-title { flex: 1; min-width: 0; padding-left: 4px; }
 .viewbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .viewbar-title small { display: block; color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .viewbar-actions { display: flex; align-items: center; gap: 2px; }
 @media (min-width: 960px) {
   .viewbar { padding-top: 6px; }
   .icon-btn.back.to-list { display: none; }
 }
 @media (max-width: 520px) { .viewbar .btn .label { display: none; } .viewbar .btn.sm { padding: 0; min-width: var(--tap); min-height: var(--tap); border-radius: 50%; } }
 .thread { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; outline: none; }
 .thread-inner { max-width: 760px; margin: 0 auto; padding: 16px calc(env(safe-area-inset-right) + 16px) 24px calc(env(safe-area-inset-left) + 16px); }
 .thread > .empty { padding-top: 80px; }
 .strip { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px calc(env(safe-area-inset-right) + 12px) 8px calc(env(safe-area-inset-left) + 12px); background: var(--surface); border-bottom: 1px solid var(--line); }
 .type-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .8125rem; font-weight: 500; }
 .type-btn[disabled] { cursor: default; }
 .type-btn.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
 .type-name { display: none; }
 @media (min-width: 600px) { .type-name { display: inline; } }
 .progress-btn { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 4px; border: 0; background: transparent; text-align: left; font-size: .8125rem; font-weight: 500; }
 .progress-btn span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
 .progress-btn .bar { margin-top: 6px; }
 .banners { flex: none; padding: 0 calc(env(safe-area-inset-right) + 12px) 0 calc(env(safe-area-inset-left) + 12px); }
 .banners:not(:empty) { padding-top: 10px; }
 .banners .notice { margin-bottom: 6px; }
 
 .context-card { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
 .context-card summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; font-weight: 600; font-size: .875rem; cursor: pointer; list-style: none; }
 .context-card summary::-webkit-details-marker { display: none; }
 .context-card summary > span { flex: 1; }
 .context-card summary .icon-down { transition: transform .2s; color: var(--muted); }
 .context-card[open] summary .icon-down { transform: rotate(180deg); }
 .context-body { padding: 0 14px 14px; font-size: .875rem; display: grid; gap: 6px; }
 .context-body h3 { margin-top: 8px; color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
 .mini-history { list-style: none; padding: 0; display: grid; gap: 10px; }
 .mini-history li { padding-left: 12px; border-left: 2px solid var(--line-strong); }
 .link-row { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 500; text-decoration: none; }
 .link-row:hover { text-decoration: underline; }
 .mini-title { margin-top: 10px; color: var(--muted); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
 
 /* ---------- Conversation ---------- */
 .chat { display: flex; flex-direction: column; gap: 4px; }
 .bubble-row { display: flex; }
 .bubble-row.me { justify-content: flex-end; }
 .bubble-row.first { margin-top: 10px; }
 .bubble { max-width: 86%; padding: 9px 13px 6px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: var(--shadow); }
 @media (min-width: 960px) { .bubble { max-width: 72%; } }
 .bubble.me { background: var(--bubble-me); color: var(--bubble-me-text); border-bottom-right-radius: 4px; }
 .bubble.agent { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
 .bubble.pending { opacity: .72; }
 .bubble .who { display: block; margin-bottom: 2px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
 .bubble .time { display: block; margin-top: 2px; text-align: right; font-size: .6875rem; opacity: .7; }
 .bubble .time .link { color: inherit; text-decoration: underline; font-size: inherit; }
 .bubble.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
 .bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
 .bubble.typing i:nth-child(2) { animation-delay: .2s; } .bubble.typing i:nth-child(3) { animation-delay: .4s; }
 @keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
 .day-sep { display: flex; justify-content: center; margin: 12px 0 4px; }
 .day-sep span { padding: 2px 12px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: .6875rem; font-weight: 500; }
 .chat.readonly { padding: 0 14px 14px; }
 
 .dock { flex: none; background: var(--surface); border-top: 1px solid var(--line); padding: 8px calc(env(safe-area-inset-right) + 12px) calc(env(safe-area-inset-bottom) + 8px) calc(env(safe-area-inset-left) + 12px); }
 .dock-note { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; }
 .dock-note .notice { margin: 0; }
 .composer-tools { max-width: 760px; margin: 0 auto 8px; display: flex; gap: 8px; }
 .composer { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px; }
 .composer-input { flex: 1; min-height: 44px; max-height: 32vh; padding: 10px 16px; border-radius: 22px; background: var(--surface-2); font-size: .9375rem; overflow-y: auto; scrollbar-width: none; }
 .composer-input::-webkit-scrollbar { display: none; }
 .icon-btn.send { background: var(--primary); color: var(--primary-text); }
 .icon-btn.send:hover { background: var(--primary); filter: brightness(1.12); }
 .icon-btn.mic { background: var(--surface-2); border: 1px solid var(--line-strong); }
 .icon-btn.mic.on { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); animation: pulse 1.4s infinite; }
 @keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 40%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
 
 /* ---------- Relecture ---------- */
 .review-text { min-height: 38vh; line-height: 1.6; }
 #review-client-text { min-height: 24vh; }
 .readonly-box { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); background: var(--surface-2); }
 .readonly-box .card-text { margin-top: 0; }
 .field > small { display: block; margin-top: 6px; }
 .review-remark { min-height: 84px; margin-top: 8px; }
 .field-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
 .preview { margin: 12px 0; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: .875rem; text-align: left; }
 .preview p { margin-top: 4px; white-space: pre-wrap; }
 .preview small { display: block; margin-top: 10px; }
 .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rotate .7s linear infinite; display: inline-block; }
 @keyframes rotate { to { transform: rotate(360deg); } }
 .spinning svg { animation: rotate .8s linear infinite; }
 
 /* ---------- Historique machine ---------- */
 .result-count { margin: -4px 4px 10px; }
 .timeline { position: relative; padding-left: 22px; }
 .timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); border-radius: 1px; }
 .timeline-item { position: relative; }
 .timeline-dot { position: absolute; left: -22px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
 .entry { margin-bottom: 12px; }
 .entry-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
 
 /* ---------- RI traitÃ© ---------- */
 .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
 .facts dt { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
 .facts dd { font-size: .9375rem; font-weight: 500; }
 .facts .chips { margin-top: 2px; }
 .text-card .card-head { align-items: center; margin-bottom: 8px; }
 .ri-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
 
 /* ---------- FenÃªtres ---------- */
 .overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(32, 41, 69, .55); animation: fade .18s; }
 .sheet { width: 100%; max-width: 520px; max-height: 90dvh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-sheet); padding: 8px 20px calc(env(safe-area-inset-bottom) + 20px); animation: rise .22s ease-out; }
 .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 4px auto 14px; }
 .sheet-body h2 { margin-bottom: 6px; font-size: 1.125rem; }
 .sheet-actions { display: grid; gap: 8px; margin-top: 18px; }
 @media (min-width: 600px) { .overlay { align-items: center; } .sheet { border-radius: 16px; padding-bottom: 20px; } .grabber { display: none; } }
 @keyframes fade { from { opacity: 0; } }
 @keyframes rise { from { transform: translateY(24px); opacity: 0; } }
 .account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
 .account-head p { margin: 0; }
 .version { margin-top: 14px; }
 .choice-list { display: grid; gap: 8px; margin-top: 12px; }
 .choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; text-align: left; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; }
 .choice span { flex: 1; }
 .choice.selected { border-color: var(--accent); background: var(--accent-soft); }
 .checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
 .checklist li { display: flex; gap: 12px; align-items: flex-start; }
 .check-mark { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); font-weight: 600; }
 .check-done .check-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
 .check-value { margin-top: 2px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
 
 .toasts { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
 .toast { display: flex; align-items: center; gap: 10px; max-width: 460px; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); animation: rise .2s ease-out; font-size: .875rem; pointer-events: auto; }
 .toast.error { background: var(--danger); }
 .toast.leaving { opacity: 0; transition: opacity .25s; }
 @media (min-width: 960px) { .toasts { bottom: 24px; } }
 
 .placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
 .placeholder img { opacity: .22; margin-bottom: 14px; }
 :root[data-theme="dark"] .placeholder img { filter: invert(1); }
 
 /* ---------- Connexion ---------- */
 body.is-login { background: var(--bg); }
 .login-screen { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); }
 .login-hero { flex: none; background: var(--appbar); color: #fff; padding: calc(env(safe-area-inset-top) + 40px) 24px 88px; }
 .login-hero .logo { display: block; width: min(227px, 70%); height: auto; margin: 0 auto 18px; }
 .hero-line { text-align: center; font-size: .9375rem; color: rgba(255, 255, 255, .78); }
 .login-card { width: calc(100% - 32px); max-width: 440px; margin: -56px auto 24px; padding: 24px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 40px rgba(32, 41, 69, .18); }
 .login-card h1 { font-size: 1.25rem; margin-bottom: 4px; }
 .login-card > p { margin-bottom: 20px; font-size: .875rem; }
 .sso { margin-bottom: 14px; }
 .sso .btn { text-decoration: none; }
 .sso .or { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: .8125rem; }
 .sso .or::before, .sso .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
 .login-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
 @media (min-width: 700px) { .login-hero { padding-bottom: 104px; } }
 
 /* ---------- Mode sombre (interrupteur) ---------- */
 .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); margin-bottom: 8px; }
 .switch-label { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; color: var(--muted); }
 .switch { position: relative; flex: none; width: 48px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--line); transition: background .2s, border-color .2s; }
 .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
 .switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
 .switch[aria-checked="true"]::after { transform: translateX(20px); }
 .login-theme { margin-top: 6px; }
 
 /* rapport client : une version Ã  la fois, bascule de langue */
 .field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
 .field-head .field-label { margin-bottom: 0; }
 .lang-chrome { display: grid; gap: 8px; margin: 8px 0; }
 .lang-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
 .lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--accent-soft); }
 .lang-tab { position: relative; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--accent-ink); font-weight: 500; font-size: .875rem; }
 .lang-tab.on { background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 18%, transparent); font-weight: 600; }
 .lang-dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
 .lang-picks { display: grid; gap: 8px; margin-top: 12px; }
 .lang-pick { min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; font-size: 1rem; text-align: left; padding: 0 16px; }
 .lang-pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
 .spinner.small { padding: 10px 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
 