/* Habilitations, licence, agent en direct, et finitions interactives. Thème repris d'Accredis (même famille de produits) :
   menu bleu nuit à accents bleu ciel, cartes blanches arrondies « verre », boutons en dégradé bleu → cyan, police Inter.
   Seuls les jetons et quelques composants sont redéfinis ; styles.css garde la structure. */
:root {
  color-scheme: light;
  --bg: #f6f8fb; --surface: #ffffff; --surface-2: #f8fafc;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b;
  --line: #e5eaf0; --line-strong: #cbd5e1;
  /* Signature DocPipe : bleu ciel tirant vers l'aigue-marine (Accredis : bleu → cyan), même famille, marque distincte */
  --accent: #0284c7; --accent-hover: #0369a1; --accent-ink: #ffffff; --accent-soft: #e0f2fe;
  --brass: #0ea5e9; --brass-soft: #f0f9ff;
  --info: #075985; --info-soft: #e0f2fe;
  --bad: #b91c1c; --bad-soft: #fee2e2; --warn: #92400e; --warn-soft: #fef3c7; --ok: #166534; --ok-soft: #dcfce7;
  --nav-bg: linear-gradient(170deg, #0a192f, #0c3a5e);
  --nav-ink: #cbd5e1; --nav-muted: #7dd3fc; --nav-line: rgb(255 255 255 / .08); --nav-hover: rgb(255 255 255 / .06);
  --gold: #7dd3fc;
  --term-bg: #0a192f; --term-ink: #e2e8f0; --term-tag: #7dd3fc; --term-line: #1e3a5f;
  --grad: linear-gradient(135deg, #0369a1 0%, #0ea5e9 55%, #2dd4bf 130%);
  --shadow: inset 0 1px 0 rgb(255 255 255 / 1), 0 4px 6px rgb(0 0 0 / .04), 0 12px 40px rgb(15 23 42 / .08);
  --shadow-lg: 0 16px 48px rgb(31 38 135 / .14);
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --serif: var(--sans);
  --mono: "JetBrains Mono", "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --r: 12px;
}
body { background: #f6f8fb; color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
h3, h4 { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.nav { background: var(--nav-bg); color: var(--nav-ink); }
img.logo { width: 38px; height: 38px; border: 0; border-radius: 11px; background: none; padding: 0; flex: none;
  box-shadow: 0 4px 14px rgb(14 165 233 / .35); }
.topbar img.logo { width: 30px; height: 30px; }
.nav .brand-name b { color: #fff; font-weight: 800; }
.nav .brand-name small { color: #7dd3fc; }
.nav-sec { color: #64748b !important; font-weight: 700; letter-spacing: .08em; }
.navitem { border-radius: 8px; color: #cbd5e1; }
.navitem svg { stroke: #7dd3fc; }
.navitem:hover { background: rgb(255 255 255 / .06); transform: translateX(2px); }
.navitem.on, .tab.navitem.on { background: rgb(56 189 248 / .16) !important; color: #fff; font-weight: 600; box-shadow: none; }
.navitem.on svg { stroke: #fff; }
.card { background: rgb(255 255 255 / .92); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgb(255 255 255 / .85);
  border-radius: 18px; box-shadow: var(--shadow); }
.card:hover { box-shadow: inset 0 1px 0 #fff, 0 14px 40px rgb(31 38 135 / .13), 0 4px 10px rgb(0 0 0 / .06); }
.btn { background: var(--grad); border: 0; border-radius: 12px; font-weight: 700; color: #fff; box-shadow: 0 4px 16px rgb(2 132 199 / .32); }
.btn:hover { background: var(--grad); box-shadow: 0 6px 22px rgb(2 132 199 / .45); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: #fff; color: #0369a1; border: 1px solid var(--line-strong); box-shadow: none; font-weight: 600; }
.btn.ghost:hover { background: #f1f5f9; color: #0369a1; border-color: #93c5fd; }
.mini { border-radius: 8px; }
.mini:not(.ghost) { background: var(--grad); border: 0; }
input, select, textarea { border-radius: 8px; border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgb(2 132 199 / .15); outline: none; }
.badge { border-radius: 999px; font-weight: 600; }
table.checks th, .matrix thead th { text-transform: uppercase; font-size: 11px; letter-spacing: .05em; color: #64748b; background: #f8fafc; }
.tile { border-top: 3px solid #0ea5e9; border-radius: 14px; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgb(31 38 135 / .14); }
.savebar { background: #0f172a; border-color: #0f172a; color: #fff; }
.savebar span { color: #fff; }
.avatar { background: #0369a1; color: #fff; }
.seg.on { color: #0369a1; }
.callout { border-left-color: #0ea5e9; background: linear-gradient(145deg, #f0f9ff, #e0f2fe); }
.licbanner.warn { background: #fff7ed; color: #9a3412; border-bottom-color: #fed7aa; }
.licbanner.bad { background: #fef2f2; color: #991b1b; border-bottom-color: #fecaca; }

/* ── Mouvement : transitions douces, coupées si l'utilisateur préfère moins d'animations */
.card, .btn, .mini, .navitem, .tile, .mod, .chip, .seg, .tick span, .switch span, .dropzone { transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .12s; }
main > section:not([hidden]) { animation: viewIn .22s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fade-in { animation: viewIn .2s ease-out; }
.card:hover { box-shadow: 0 1px 0 rgb(20 33 61 / .04), 0 4px 14px rgb(20 33 61 / .08); }
.mini:active, .seg:active { transform: translateY(1px); }
.tile { cursor: default; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Onglets segmentés */
.segtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 6px 0 14px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; width: fit-content; max-width: 100%; }
.seg { border: 0; background: transparent; color: var(--text); padding: 6px 14px; border-radius: 6px; font: inherit; cursor: pointer; }
.seg:hover { background: var(--surface); color: var(--ink); }
.seg.on { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }

/* ── Formulaires */
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; align-items: end; margin: 10px 0; }
.formgrid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.formgrid .span2 { grid-column: 1 / -1; }
.formgrid input:not([type=checkbox]):not([type=radio]), .formgrid select, .adm-top input, .pwtest input {
  font: inherit; color: var(--text); padding: 8px 11px; min-height: 38px; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 8px; box-sizing: border-box; width: 100%; }
.formgrid fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.formgrid legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
label.check { display: inline-flex; gap: 6px; align-items: center; color: var(--text); }
.callout { border-left: 3px solid var(--brass); background: var(--brass-soft); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; margin: 6px 0 12px; }
details.adm-new { margin-top: 14px; }
details.adm-new > summary { list-style: none; width: fit-content; cursor: pointer; }
details.adm-new > summary::-webkit-details-marker { display: none; }
details.adm-new[open] > summary { margin-bottom: 4px; }
ul.plain { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 3px; }

/* ── Utilisateurs */
.adm-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.adm-top .grow { flex: 1 1 220px; }
.meter { display: grid; gap: 2px; min-width: 150px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.meter b { font: 600 20px/1.1 var(--serif); color: var(--ink); }
.meter span { font-size: 12px; color: var(--muted); }
.meter .track, .lic-card .track { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter .track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .6s ease; }
.meter.full .track i { background: var(--bad); }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; float: left; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; margin: 1px 0; }
.acts-cell { white-space: nowrap; }
.adm-users tbody tr:hover { background: var(--surface-2); }

/* ── Matrice rôles × droits */
.matrix-wrap { max-height: 62vh; border: 1px solid var(--line); border-radius: var(--r); }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.matrix th, .matrix td { padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.matrix thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; text-align: center; background: var(--surface-2); }
.matrix thead th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; min-width: 260px; }
.matrix thead th:first-child { z-index: 3; }
.matrix .rname { display: block; font-weight: 600; color: var(--ink); }
.matrix tr.grp th { text-align: left; background: var(--surface-2); color: var(--brass); font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.matrix td { text-align: center; }
.matrix td code { display: block; color: var(--muted); }
.matrix tr.off td { opacity: .5; }
.matrix tbody tr:hover td { background: var(--accent-soft); }
.matrix td.changed { box-shadow: inset 0 0 0 2px var(--warn); }
.tick { display: inline-grid; cursor: pointer; }
.tick input { position: absolute; opacity: 0; }
.tick span { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; }
.tick input:checked + span { background: var(--accent); border-color: var(--accent); }
.tick input:checked + span::after { content: ''; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.tick input:disabled + span { opacity: .6; cursor: not-allowed; }
.tick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.savebar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; padding: 10px 12px;
  background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--r); animation: viewIn .2s ease-out; }
.savebar span { margin-right: auto; color: var(--warn); font-weight: 600; }

/* ── Sécurité */
.policy { display: grid; gap: 14px; max-width: 640px; }
.range { display: grid; grid-template-columns: 1fr 160px 56px; gap: 12px; align-items: center; }
.range input { accent-color: var(--accent); }
.range output { font: 600 15px var(--serif); color: var(--ink); text-align: right; }
.switch { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 36px; height: 20px; border-radius: 10px; background: var(--line-strong); position: relative; flex: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pwtest { display: grid; gap: 4px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.pwtest label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

/* ── Licence */
.lic-grid { display: grid; grid-template-columns: minmax(280px, 1.1fr) 1fr; gap: 18px; margin-bottom: 8px; }
@media (max-width: 860px) { .lic-grid { grid-template-columns: 1fr; } .range { grid-template-columns: 1fr; } }
.lic-card { display: flex; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lic-card h4 { margin: 6px 0 2px; }
.ring { --c: var(--accent); flex: none; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0);
  animation: ringIn .8s ease-out; }
@keyframes ringIn { from { transform: rotate(-90deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.ring b { font: 600 24px/1 var(--serif); color: var(--ink); }
.ring span { font-size: 11px; color: var(--muted); }
.lic-card.warn .ring { --c: var(--warn); }
.lic-card.bad .ring { --c: var(--bad); }
.lic-card.ok .ring { --c: var(--ok); }
.copyline { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.copyline code { flex: 1; overflow-wrap: anywhere; }
.dropzone { display: grid; place-items: center; min-height: 86px; padding: 14px; margin-top: 6px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: 10px; color: var(--muted); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mod { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); opacity: .65; }
.mod.on { opacity: 1; border-color: var(--accent); }
.mod .dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--line-strong); flex: none; }
.mod.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.mod div { display: grid; }
a.btnlike { text-decoration: none; }
.licbanner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 16px; font-size: 13.5px; animation: viewIn .25s ease-out; }
.licbanner.warn { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn); }
.licbanner.bad { background: var(--bad-soft); color: var(--bad); border-bottom: 1px solid var(--bad); }

/* ── Agent : réponse écrite en direct, avis 👍 / 👎 */
.msg.streaming .live { min-height: 1.4em; }
.caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); border-radius: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.msg { animation: msgIn .18s ease-out; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msgfoot .rate { display: inline-flex; gap: 4px; margin-left: auto; }
.msgfoot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msgfoot .rate .mini { padding: 0 6px; min-height: 22px; opacity: .65; }
.msgfoot .rate .mini:hover { opacity: 1; transform: scale(1.08); }
.msg .draft + .live { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.thinking { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: think 1.2s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ai-tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; margin-right: 4px; }

/* ── Résultats d'examen en onglets */
.res-tabs { display: flex; gap: 2px; margin: 14px -4px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.res-tab { position: relative; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.res-tab:hover { color: var(--ink); }
.res-tab.on { color: var(--accent); }
.res-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
.res-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: 11.5px; border: 1px solid var(--line); }
.res-count.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.res-count.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.res-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.res-tile { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  border-top: 3px solid var(--line-strong); cursor: pointer; font: inherit; }
.res-tile b { font-size: 26px; line-height: 1.1; color: var(--ink); }
.res-tile span { font-size: 12.5px; color: var(--muted); }
.res-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgb(31 38 135 / .12); }
.res-tile.bad { border-top-color: var(--bad); } .res-tile.bad b { color: var(--bad); }
.res-tile.warn { border-top-color: #f59e0b; } .res-tile.ok { border-top-color: #10b981; }
.res-causes { padding: 12px 16px; border-radius: 14px; background: linear-gradient(145deg, #f0f9ff, #e0f2fe); border: 1px solid #bae6fd; }
.res-causes h4 { margin: 0 0 6px; }
.res-causes ol { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; }
#results.res-focus .card { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }

/* ── Criblage par partie */
.sc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sc-stat { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; }
.sc-stat b { font-size: 22px; color: var(--ink); } .sc-stat span { font-size: 12px; color: var(--muted); }
.sc-stat.bad { background: var(--bad-soft); } .sc-stat.bad b { color: var(--bad); }
.sc-stat.warn { background: var(--warn-soft); } .sc-stat.warn b { color: var(--warn); }
.sc-stat.ok b { color: var(--ok); }
.sc-group h4 { margin: 14px 0 8px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sc-card { border: 1px solid var(--line); border-left: 4px solid #10b981; border-radius: 12px; padding: 10px 12px; background: #fff; display: grid; gap: 8px; }
.sc-card.bad { border-left-color: var(--bad); background: linear-gradient(90deg, #fff5f5, #fff 40%); }
.sc-card.warn { border-left-color: #f59e0b; } .sc-card.info { border-left-color: var(--line-strong); }
.sc-card:hover { box-shadow: 0 8px 24px rgb(31 38 135 / .10); transform: translateY(-1px); }
.sc-head { display: flex; gap: 10px; align-items: flex-start; }
.sc-who { display: grid; flex: 1; min-width: 0; } .sc-who b { overflow-wrap: anywhere; }
.sc-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: #10b981; box-shadow: 0 0 0 3px #dcfce7; flex: none; }
.sc-card.bad .sc-dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: pulse 1.6s infinite; }
.sc-card.warn .sc-dot { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgb(185 28 28 / .08); } }
.sc-hit { border-radius: 10px; padding: 8px 10px; background: var(--surface-2); display: grid; gap: 4px; }
.sc-hit.bad { background: var(--bad-soft); } .sc-hit.warn { background: #fffbeb; } .sc-hit.cleared { opacity: .7; }
.sc-hit-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.sc-meta span:not(:last-child)::after { content: '·'; margin-left: 10px; }
.sc-score { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.sc-score .track { flex: 1; height: 6px; border-radius: 3px; background: #fff; overflow: hidden; }
.sc-score .track i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, var(--bad)); border-radius: 3px; }
.sc-head { flex-wrap: wrap; }
.sc-who { flex: 1 1 170px; }
.sc-head .badge { margin-left: auto; white-space: nowrap; }

/* ── Connexion */
.login-screen { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); background: #f6f8fb; }
.login-hero { position: relative; overflow: hidden; color: #e2e8f0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 10% 0%, rgb(14 165 233 / .35), transparent 60%), linear-gradient(160deg, #0a192f, #0c3a5e 70%, #0b4f80); }
.login-hero::after { content: ''; position: absolute; inset: auto -120px -160px auto; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgb(45 212 191 / .25), transparent 65%); animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-60px, -40px) scale(1.1); } }
.login-hero .brandline { display: flex; gap: 12px; align-items: center; } .login-hero .brandline img { width: 46px; height: 46px; }
.login-hero h1 { font-size: 34px; line-height: 1.15; color: #fff; margin: 0 0 12px; max-width: 520px; }
.login-hero ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; max-width: 460px; }
.login-hero li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; } .login-hero li::before { content: '✓'; color: #5eead4; font-weight: 800; }
.login-panel { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); display: grid; gap: 14px; padding: 30px; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgb(15 23 42 / .12); animation: viewIn .3s ease-out; }
.login-card h2 { margin: 0; font-size: 22px; color: var(--ink); } .login-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.login-card input { font: inherit; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.pwfield { position: relative; } .pwfield input { width: 100%; box-sizing: border-box; padding-right: 74px; }
.pwfield button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--accent); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.capslock { color: var(--warn); font-size: 12px; } .login-card .btn { min-height: 44px; font-size: 15px; }
.login-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.login-foot span::before { content: '🔒 '; }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-width: 860px) { .login-screen { grid-template-columns: 1fr; } .login-hero { display: none; } }

/* ── Identité DocPipe (distincte d'Accredis) : menu clair blanc / bleu ciel, accent aigue-marine */
:root { --nav-bg: linear-gradient(180deg, #ffffff 0%, #f0f9ff 60%, #e0f2fe 100%); --nav-ink: #1e3a56; --nav-muted: #0284c7;
  --nav-line: #dbeafe; --nav-hover: #e0f2fe; }
.nav { background: var(--nav-bg); color: var(--nav-ink); border-right: 1px solid #dbeafe; box-shadow: 4px 0 24px rgb(2 132 199 / .06); }
.nav .brand-name b { color: #0b2a45; }
.nav .brand-name small { color: #0284c7; }
.nav-sec { color: #7aa7c7 !important; }
.navitem { color: #1e3a56; }
.navitem svg { stroke: #0ea5e9; }
.navitem:hover { background: #e0f2fe; color: #0369a1; }
.navitem.on, .tab.navitem.on { position: relative; background: linear-gradient(90deg, #e0f2fe, #f0f9ff) !important; color: #0369a1; font-weight: 700; }
.navitem.on::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #0ea5e9, #2dd4bf); animation: grow .25s ease-out; }
@keyframes grow { from { transform: scaleY(.2); } to { transform: none; } }
.navitem.on svg { stroke: #0369a1; }
.nav .collapse svg, .nav .iconbtn svg { stroke: #0284c7; }
.nav-foot { border-top: 1px solid #dbeafe; }
.nav-ctx .ctx-body { color: #1e3a56; }
.navcount, .nav .count { background: #0ea5e9; color: #fff; }
#engine.pill { background: #e0f2fe; color: #0369a1; }
.topbar { background: #fff; border-bottom: 1px solid #dbeafe; }

/* ── Compte, double authentification */
.pwmeter { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; }
.pwmeter .track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pwmeter i { display: block; height: 100%; width: 0; border-radius: 3px; background: #ef4444; transition: width .25s, background .25s; }
.pwmeter[data-s="2"] i { background: #f59e0b; } .pwmeter[data-s="3"] i { background: #10b981; } .pwmeter[data-s="4"] i { background: linear-gradient(90deg, #10b981, #0ea5e9); }
.otp { font: 600 26px/1 var(--mono); letter-spacing: .35em; text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; justify-self: start; }
.mfabox { max-width: 440px; display: grid; gap: 10px; }
.mfabox .qr { display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.mfabox .qr svg { width: 200px; height: 200px; }
.steps3 { margin: 0; padding-left: 20px; }
.reccodes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.reccodes code { text-align: center; padding: 8px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 8px; font-size: 14px; }
.acct { max-width: 480px; display: grid; gap: 14px; }
.acct section { border-top: 1px solid var(--line); padding-top: 10px; }
.acct-head { display: flex; gap: 12px; align-items: center; } .acct-head h3 { margin: 0; }
.avatar.big { width: 46px; height: 46px; font-size: 18px; float: none; margin: 0; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #0369a1, #2dd4bf); color: #fff; font-weight: 700; }
.iconx { margin-left: auto; border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--muted); }
.iconx:hover { background: #e0f2fe; color: #0369a1; }

/* ── Cohérence : fiches avec différences */
.coh-head { display: flex; gap: 18px; align-items: center; margin: 4px 0 14px; flex-wrap: wrap; }
.coh-head > div:last-child { flex: 1; min-width: 260px; } .coh-head p { margin: 2px 0 6px; }
.coh-gauge { --c: #10b981; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #fff 76%, transparent 77% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #fee2e2 0); animation: ringIn .7s ease-out; }
.coh-gauge b { font-size: 20px; color: var(--ink); } .coh-gauge span { font-size: 10.5px; color: var(--muted); }
.coh-filter { margin: 0; }
.coh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.coh-grid[data-filter="bad"] .coh-card[data-coh="ok"], .coh-grid[data-filter="ok"] .coh-card[data-coh="bad"] { display: none; }
.coh-card { border: 1px solid var(--line); border-top: 3px solid #10b981; border-radius: 14px; background: #fff; padding: 12px 14px; display: grid; gap: 8px;
  animation: viewIn .25s ease-out both; }
.coh-card.bad { border-top-color: var(--bad); background: linear-gradient(180deg, #fff7f7, #fff 38%); }
.coh-card.eq { border-top-color: #f59e0b; }
.coh-card:hover { box-shadow: 0 12px 30px rgb(31 38 135 / .10); transform: translateY(-2px); }
.coh-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .coh-card h4 { margin: 0; font-size: 14px; }
.coh-st { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.coh-st.ok { background: #dcfce7; color: #166534; } .coh-st.bad { background: #fee2e2; color: #991b1b; } .coh-st.eq { background: #fef3c7; color: #92400e; }
.coh-ref { padding: 6px 10px; border-radius: 8px; background: #f0f9ff; font-size: 13px; }
.coh-rows { display: grid; gap: 4px; }
.coh-row { display: grid; grid-template-columns: 20px 110px 1fr auto; gap: 8px; align-items: baseline; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.coh-row.bad { background: #fff1f1; } .coh-row.ref { color: var(--muted); }
.coh-sym { font-weight: 800; text-align: center; } .coh-row.ok .coh-sym { color: #16a34a; } .coh-row.bad .coh-sym { color: var(--bad); }
.coh-row.eq .coh-sym { color: #d97706; } .coh-row.ref .coh-sym { color: #0284c7; }
.coh-src { color: var(--muted); font-size: 12px; } .coh-val { overflow-wrap: anywhere; color: var(--ink); }
mark.ins { background: #fecaca; color: #7f1d1d; border-radius: 3px; padding: 0 2px; }
mark.del { background: #bae6fd; color: #0c4a6e; border-radius: 3px; padding: 0 2px; }
.coh-proof { font-size: 11.5px; white-space: nowrap; }

/* ── Criblage : matrice noms × listes */
.sm-banner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.sm-banner.ok { background: #ecfdf5; color: #166534; } .sm-banner.warn { background: #fffbeb; color: #92400e; } .sm-banner.bad { background: #fef2f2; color: #991b1b; }
.sm-banner b { font-size: 15px; } .sm-banner .mini { margin-left: auto; }
.sm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sm-matrix th, .sm-matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.sm-matrix thead th { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); position: sticky; top: 0; }
.sm-matrix tbody th { text-align: left; font-weight: 400; min-width: 230px; } .sm-matrix tbody th b { display: block; color: var(--ink); overflow-wrap: anywhere; }
.sm-kind { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #0284c7; font-weight: 700; }
.sm-matrix td.ok { color: #16a34a; font-weight: 700; } .sm-matrix td.na { color: var(--line-strong); }
.sm-matrix td.warn { background: #fffbeb; } .sm-matrix td.bad { background: #fef2f2; }
.sm-cell { border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.sm-matrix td.warn .sm-cell { color: #b45309; } .sm-matrix td.bad .sm-cell { color: var(--bad); }
.sm-cell:hover { background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .08); }
.sm-matrix tbody tr:not(.sm-detail):hover th, .sm-matrix tbody tr:not(.sm-detail):hover td.ok { background: #f0f9ff; }
.sm-detail td { text-align: left; background: #fafcff; }
.sm-det { display: grid; gap: 6px; padding: 8px 10px; border-left: 3px solid #f59e0b; border-radius: 6px; } .sm-det.bad { border-left-color: var(--bad); }
.sm-legend .ok { color: #16a34a; font-weight: 700; } .sm-legend .warn { color: #b45309; font-weight: 700; } .sm-legend .bad { color: var(--bad); font-weight: 700; }

/* ── Registre des navires */
.vs-lists { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; align-items: center; }
.vs-chip { display: grid; text-align: left; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; }
.vs-chip b { font-size: 18px; color: var(--ink); } .vs-chip span { font-size: 12px; color: var(--muted); }
.vs-chip.on, .vs-chip:hover { border-color: #0ea5e9; background: #f0f9ff; }
.vs-table td { vertical-align: top; }

/* ── Cohérence v2 : écarts « attendu → trouvé », concordances compactes */
.coh-body[data-filter="bad"] [data-coh="ok"], .coh-body[data-filter="ok"] [data-coh="bad"] { display: none; }
.gap-list { display: grid; gap: 12px; margin-bottom: 16px; }
.gap-card { border: 1px solid #fecaca; border-left: 4px solid var(--bad); border-radius: 14px; background: #fff; padding: 12px 16px; display: grid; gap: 10px;
  animation: viewIn .25s ease-out both; }
.gap-card:hover { box-shadow: 0 12px 30px rgb(185 28 28 / .08); }
.gap-card header { display: flex; gap: 10px; align-items: center; } .gap-card h4 { margin: 0; font-size: 15px; flex: 1; }
.gap-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); font-weight: 800; font-size: 13px; }
.gap-cmp { display: grid; grid-template-columns: 1fr 34px 1.2fr; gap: 10px; align-items: stretch; }
.gap-exp, .gap-found { border-radius: 10px; padding: 8px 12px; display: grid; gap: 4px; align-content: start; }
.gap-exp { background: #f0f9ff; } .gap-found { background: #fff5f5; }
.gap-lab { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.gap-val { font-size: 15px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; } .gap-val.bad { color: #991b1b; }
.gap-arrow { display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.gap-delta { font-size: 13px; color: #991b1b; } .gap-delta b { font-size: 14px; }
.gap-agree { font-size: 12.5px; color: #166534; }
.gap-fix { font-size: 13px; padding: 8px 12px; border-radius: 10px; background: linear-gradient(90deg, #ecfeff, #f0f9ff); border: 1px solid #bae6fd; }
.ok-list { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 6px 14px 10px; }
.ok-list h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ok-row { display: grid; grid-template-columns: 24px minmax(150px, .8fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ok-row:first-of-type { border-top: 0; }
.ok-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #166534; font-weight: 800; font-size: 12px; }
.ok-ico.eq { background: #fef3c7; color: #92400e; }
.ok-lab { color: var(--muted); } .ok-val { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ok-src { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.src-chip { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 760px) { .gap-cmp { grid-template-columns: 1fr; } .gap-arrow { transform: rotate(90deg); } .ok-row { grid-template-columns: 24px 1fr; } .ok-val, .ok-src { grid-column: 2; justify-content: flex-start; } }

/* ── Criblage v2 */
.sm-banner { display: flex; gap: 12px; align-items: center; } .sm-banner > div { display: grid; flex: 1; } .sm-banner span { font-size: 12.5px; }
.sm-big { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: #fff; flex: none; }
.sm-banner.ok .sm-big { color: #16a34a; } .sm-banner.warn .sm-big { color: #b45309; } .sm-banner.bad .sm-big { color: var(--bad); }
.sm-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sm-cat { display: grid; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid #10b981; background: #fff; }
.sm-cat span { font-size: 12px; color: var(--muted); } .sm-cat b { font-size: 14px; color: var(--ink); } .sm-cat small { font-size: 11px; color: var(--muted); }
.sm-cat.warn { border-left-color: #f59e0b; } .sm-cat.bad { border-left-color: var(--bad); background: #fff5f5; } .sm-cat.na { border-left-color: var(--line-strong); }
.sm-matrix { table-layout: fixed; }
.sm-matrix col.c-name { width: 34%; } .sm-matrix col.c-verdict { width: 110px; }
.sm-matrix thead th span { display: block; } .sm-matrix thead th small { display: block; font-size: 10px; text-transform: none; letter-spacing: 0; color: #94a3b8; font-weight: 500; }
.sm-matrix th, .sm-matrix td { padding: 6px 8px; }
.sm-matrix tbody th b { font-size: 13px; } .sm-matrix tbody th span { display: block; font-size: 11.5px; }
.sm-group th { background: #f0f9ff !important; color: #0369a1; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; text-align: left !important; }
.dot-ok { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 800; }
.sm-row.bad th { box-shadow: inset 3px 0 0 var(--bad); } .sm-row.warn th { box-shadow: inset 3px 0 0 #f59e0b; }
.sm-matrix tbody tr.sm-row:nth-of-type(even) th, .sm-matrix tbody tr.sm-row:nth-of-type(even) td.ok { background: #fcfdff; }

/* ── Blocs de détail repliés en fin d'onglet ; carte risque de fraude */
details.res-more { margin-top: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 4px 12px; background: var(--surface-2); }
details.res-more > summary { cursor: pointer; padding: 6px 0; font-weight: 600; color: var(--accent); display: flex; gap: 8px; align-items: baseline; }
details.res-more[open] { background: #fff; }
.rk-card { display: flex; gap: 16px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; margin-bottom: 12px; }
.rk-score { flex: none; width: 74px; height: 74px; border-radius: 16px; display: grid; place-content: center; text-align: center; background: #ecfdf5; }
.rk-card.warn .rk-score { background: #fffbeb; } .rk-card.bad .rk-score { background: #fef2f2; }
.rk-score b { font-size: 26px; line-height: 1; color: #166534; } .rk-card.warn .rk-score b { color: #b45309; } .rk-card.bad .rk-score b { color: var(--bad); }
.rk-score span { font-size: 11px; color: var(--muted); }
.rk-main { flex: 1; display: grid; gap: 8px; min-width: 0; } .rk-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rk-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #bbf7d0, #fde68a 50%, #fecaca); }
.rk-bar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.rk-factors { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rk-factors li { display: grid; grid-template-columns: 34px auto 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.rk-w { font-size: 11px; font-weight: 700; color: #b45309; background: #fffbeb; border-radius: 6px; text-align: center; padding: 1px 0; }
.rk-factors .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
