/* =========================================================
   Mire — feuille de style de l'application
   Direction artistique : Encre #0A1F44 · Bleu #0B5CFF · Ciel #5B9CFF · Brume #C5CDD5
   ========================================================= */

:root {
  --ink: #0A1F44;
  --ink-2: #3A4B6B;
  --ink-3: #6C7C9A;
  --blue: #0B5CFF;
  --blue-ink: #0A46C2;
  --sky: #5B9CFF;
  --mist: #C5CDD5;
  --paper: #F5F7FB;
  --white: #FFFFFF;
  --border: #DFE5EF;
  --night: #080D18;

  --ok: #12805C;
  --warn: #B45309;
  --bad: #D92D20;
  --ok-bg: rgba(18,128,92,.12);
  --warn-bg: rgba(180,83,9,.13);
  --bad-bg: rgba(217,45,32,.12);
  --info-bg: rgba(11,92,255,.10);

  --f-display: "Sora", "Instrument Sans", system-ui, sans-serif;
  --f-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 100px;
  --sh-1: 0 1px 2px rgba(10,31,68,.04), 0 1px 3px rgba(10,31,68,.05);
  --sh-2: 0 6px 20px rgba(10,31,68,.08), 0 2px 6px rgba(10,31,68,.05);
  --sh-3: 0 24px 60px rgba(8,13,24,.28), 0 8px 24px rgba(8,13,24,.18);
  --ease: cubic-bezier(.2,0,0,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -0.02em; line-height: 1.2; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------------- mark + wordmark ---------------- */
.mark { display: inline-block; width: 24px; height: auto; flex: none; position: relative; top: 3.5px; }
.side-head .mark { top: 3.5px; }
.wordmark { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; }

/* ================= CONNEXION ================= */
.login { display: grid; grid-template-columns: 44% 1fr; min-height: 100vh; }
.login-brand {
  position: relative; overflow: hidden; color: #fff;
  background: var(--ink);
  padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column;
}
.login-brand::after {
  content: ''; position: absolute; right: -8px; bottom: -60px; width: 340px; height: 340px; opacity: .10;
  background: url("assets/mire-symbol.png") no-repeat center/contain;
}
.brand-lock { display: flex; align-items: baseline; gap: 10px; position: relative; z-index: 1; }
.brand-lock .wordmark { font-size: 20px; }
.login-pitch { margin-top: auto; position: relative; z-index: 1; }
.login-pitch h1 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; max-width: 22ch; }
.pitch-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: #C6D3EA; }
.pitch-list li { display: flex; align-items: center; gap: 10px; }
.pitch-list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--sky); flex: none; }
.login-foot { margin-top: 30px; font-size: 12px; color: #8296BC; position: relative; z-index: 1; }
.login-form { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 56px); background: var(--white); }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.form-card { width: 100%; max-width: 360px; padding: 32px; border: none; box-shadow: none; }
.form-card h2 { font-size: 22px; }
.form-card > .muted { font-size: 13px; margin-top: 6px; margin-bottom: 22px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; font-size: 14px; font-family: var(--f-sans); color: var(--ink);
  background: var(--white); border: 1px solid var(--border); border-radius: 9px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.16); }
.form-error { color: var(--bad); font-size: 12.5px; margin: 2px 0 12px; }
.login-hint { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.login-hint b { color: var(--ink-2); font-weight: 600; }

/* ================= CONFIGURATION INITIALE ================= */
.setup-shell { min-height: 100vh; background: #F8FAFD; color: var(--ink); display: grid; grid-template-rows: auto 1fr auto; opacity: 1; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.setup-shell[hidden] { display: none; }
.setup-shell.setup-leave { opacity: 0; transform: scale(.992); }
.setup-top, .setup-foot { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(24px,5vw,72px); }
.setup-top { border-bottom: 1px solid var(--border); background: rgba(255,255,255,.82); }
.setup-top .brand-lock { color: var(--ink); }
.setup-top .wordmark { font-size: 18px; }
.setup-top > span, .setup-foot, .setup-tools { color: var(--ink-3); font-size: 11.5px; }
.setup-tools { display: flex; align-items: center; gap: 18px; }
#setupSound { border: 0; border-bottom: 1px solid #CBD4E2; background: transparent; color: var(--ink-2); padding: 2px 0; font-size: 11.5px; }
#setupSound[aria-pressed="false"] { color: var(--ink-3); }
.setup-main { width: min(760px, calc(100% - 40px)); margin: auto; padding: 30px 0 24px; }
.setup-progress { height: 2px; background: #E7EBF2; overflow: hidden; margin-bottom: clamp(28px,5vh,48px); }
.setup-progress i { display: block; height: 100%; width: 8%; background: var(--blue); transition: width .7s var(--ease); }
.setup-stage { min-height: min(420px, calc(100vh - 190px)); display: flex; flex-direction: column; }
.setup-stage.is-entering { animation: setupIn .5s var(--ease) both; }
@keyframes setupIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.setup-copy { max-width: 640px; }
.setup-kicker { display: block; color: var(--blue-ink); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.setup-welcome { display: block; color: var(--ink-2); font-family: var(--f-sans); font-size: 15px; font-weight: 500; letter-spacing: 0; margin-bottom: 14px; }
.nav-item.module-locked { color: var(--ink-3); }
.nav-item.module-locked::after { content: 'Verrouillé'; margin-left: auto; font-size: 9.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.setup-copy h1, .setup-preparing h1 { font-size: clamp(27px,3.3vw,38px); font-weight: 600; letter-spacing: -.035em; }
.setup-copy p, .setup-preparing p { color: var(--ink-3); font-size: 15px; line-height: 1.65; margin-top: 12px; max-width: 590px; }
.setup-form { margin-top: 24px; max-width: 650px; }
.setup-form .form-grid { gap: 16px 18px; }
.setup-form .field input { background: #fff; padding: 13px 14px; }
.setup-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; padding-top: 0; }
.setup-actions-main { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.setup-defer { color: var(--ink-2); text-decoration: none; padding: 9px 4px; }
.setup-defer:hover { color: var(--blue-ink); }
.setup-next { min-width: 180px; padding: 11px 20px; }
.setup-next:disabled { cursor: default; opacity: .48; }
.setup-next.is-ready, .tour-pop [data-tnext].is-ready { animation: setupReady 1.8s ease-in-out 2; }
.setup-stage.is-narrating .setup-form, .setup-stage.is-narrating .setup-actions, .setup-stage.is-narrating .setup-choices { pointer-events: none; }
@keyframes setupReady { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 5px rgba(11,92,255,.14), 0 8px 24px rgba(11,92,255,.18); transform: translateY(-1px); } }
.tour-sound { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); }
.tour-sound:hover { background: var(--paper); color: var(--ink); }
.tour-sound svg { width: 15px; height: 15px; }
.setup-back, .setup-link { border: 0; background: transparent; color: var(--ink-3); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.setup-suffix { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.setup-suffix input { border: 0 !important; box-shadow: none !important; }
.setup-suffix span { padding-right: 14px; color: var(--ink-3); }
.setup-note { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px; border-left: 2px solid var(--blue); background: #F1F5FF; font-size: 12px; }
.setup-note span { color: var(--ink-3); }
.setup-choices { display: grid; gap: 10px; margin-top: 32px; }
.setup-choice { display: grid; grid-template-columns: minmax(150px,.7fr) 1fr; gap: 18px; align-items: center; width: 100%; padding: 17px 18px; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease); }
.setup-choice:hover { border-color: #AFC4ED; transform: translateY(-1px); }
.setup-choice.selected { border-color: var(--blue); background: #F3F7FF; box-shadow: 0 0 0 1px var(--blue); }
.setup-choice strong { font-size: 13px; }
.setup-choice span { color: var(--ink-3); font-size: 12.5px; }
.setup-preparing { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.setup-preparing h1, .setup-preparing p { transition: opacity .16s ease, transform .16s ease; }
.setup-preparing .swap { opacity: 0; transform: translateY(5px); }
.setup-pulse { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 28px; }
.setup-pulse::before { content: ''; position: absolute; width: 52px; height: 52px; border: 1px solid rgba(11,92,255,.25); border-radius: 50%; animation: calmPulse 2.4s ease-in-out infinite; }
.setup-pulse img { width: 28px; }
@keyframes calmPulse { 0%,100% { transform: scale(.9); opacity: .45; } 50% { transform: scale(1.18); opacity: .9; } }
.setup-loader { width: min(380px,80vw); height: 2px; margin-top: 32px; background: #E7EBF2; overflow: hidden; }
.setup-loader i { display: block; height: 100%; width: 42%; background: var(--blue); animation: setupLoad 1.7s var(--ease) infinite; }
@keyframes setupLoad { from { transform: translateX(-110%); } to { transform: translateX(350%); } }
.setup-foot { border-top: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .setup-stage.is-entering, .setup-pulse::before, .setup-loader i { animation: none; } }

/* ================= BOUTONS ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), color .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--mist); background: var(--paper); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-danger:hover { background: rgba(217,45,32,.18); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--ink-3); transition: background .15s var(--ease), color .15s var(--ease); }
.icon-btn:hover { background: var(--paper); color: var(--ink); }

/* ================= APP SHELL ================= */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.side-head { display: flex; align-items: baseline; gap: 10px; padding: 4px 8px 18px; }
.side-head .side-close { align-self: center; }
.side-head .wordmark { font-size: 18px; }
.side-close { display: none; margin-left: auto; color: #9FB2D4; }
.side-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; border: none; background: transparent; color: #9FB2D4; font-size: 13px; text-align: left; transition: background .15s var(--ease), color .15s var(--ease); }
.nav-item:hover { background: rgba(255,255,255,.05); color: #E7EEFB; }
.nav-item.active { background: rgba(255,255,255,.10); color: #fff; font-weight: 600; }
.nav-ind { display: none; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; border-top: 1px solid rgba(255,255,255,.09); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--sky), var(--blue)); flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who b { font-size: 12px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 10.5px; color: #8296BC; text-transform: capitalize; }
.side-foot .icon-btn { margin-left: auto; color: #9FB2D4; }
.side-foot .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 26px; background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.burger { display: none; }
.top-titles { min-width: 0; }
.top-titles h1 { font-size: 17px; font-weight: 600; }
.top-titles p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-context { color: var(--ink-3); font-size: 11.5px; font-weight: 600; padding-right: 12px; border-right: 1px solid var(--border); }
.view { padding: 24px 26px 40px; }

/* ================= COMPOSANTS ================= */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill-info { background: var(--info-bg); color: var(--blue-ink); }
.pill-round { border: 1px solid var(--border); background: var(--white); color: var(--ink-2); font-weight: 500; }

.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 6px; border: 1px solid currentColor; font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.2; flex-shrink: 0; background: transparent; }
.badge::before { display: none; }
.badge-ok { color: var(--ok); }
.badge-warn { color: var(--warn); }
.badge-bad { color: var(--bad); }
.badge-info { color: var(--blue-ink); }
.badge-neutral { color: var(--ink-3); }
.grade-code { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--ink); }

.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.stats { grid-template-columns: repeat(3, 1fr); }
.stats.cols4 { grid-template-columns: repeat(4, 1fr); }
.stats.cols5 { grid-template-columns: repeat(5, 1fr); }
.split { grid-template-columns: 1.15fr 1fr; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .muted { font-size: 11.5px; margin-top: 3px; }

.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--sh-1); }
.stat .k { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--f-display); font-size: 27px; font-weight: 700; margin-top: 6px; }
.stat .s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.stat.accent { border-top: 2px solid var(--ink-2); }
.stat.accent.clickable { background: #F1F5FF; border: 1px solid #C9D8F6; }
.stat.accent.clickable:hover { background: #EAF1FF; border-color: var(--blue); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.chip { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); color: var(--ink-2); font-size: 12.5px; }
.chip:hover { border-color: var(--mist); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.table-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); overflow-x: auto; overflow-y: hidden; box-shadow: var(--sh-1); }
.reports-table table { min-width: 1040px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th { text-align: left; padding: 12px 16px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--paper); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s var(--ease); }
.tbl tbody tr:hover { background: var(--paper); }
.tbl tbody tr.selectable { cursor: pointer; }
.tbl .strong { font-weight: 600; }
.tbl .t-right { text-align: right; }
.tbl .t-center { text-align: center; }
.crit-score { font-family: var(--f-mono); font-weight: 500; color: var(--blue); }

.bars { display: flex; align-items: flex-end; gap: 18px; height: 150px; padding: 0 6px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.bars .bar .col { width: 100%; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--blue), var(--sky)); transition: height .5s var(--ease); }
.bars .bar .lab { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }

.list-bars { display: flex; flex-direction: column; gap: 12px; }
.list-bars .row { display: flex; align-items: center; gap: 12px; }
.list-bars .name { width: 96px; font-size: 12px; color: var(--ink-2); }
.list-bars .track { flex: 1; display: block; height: 8px; border-radius: var(--r-pill); background: var(--paper); overflow: hidden; }
.list-bars .fill { display: block; height: 100%; min-height: 8px; border-radius: var(--r-pill); background: var(--blue); }
.list-bars .val { width: 52px; text-align: right; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }

.chart { position: relative; display: flex; align-items: flex-end; gap: 16px; height: 198px; padding: 0 8px; }
.chart .colw { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; z-index: 1; }
.chart .colw .cval { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); }
.chart .colw .ccol { width: 100%; border-radius: 7px 7px 3px 3px; }
.chart .colw .clab { font-size: 10.5px; color: var(--ink-3); }
.chart .seuil { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--bad); opacity: .75; }
.legend { display: flex; gap: 16px; font-size: 10.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty h3 { font-size: 15px; color: var(--ink); margin-bottom: 6px; }

/* ================= MODALE ================= */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10,31,68,.42); backdrop-filter: blur(3px); animation: fade .18s var(--ease); }
.modal { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-3); width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column; animation: pop .2s var(--ease); }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 4px 22px 8px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.slider-row { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.slider-row .lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.slider-row input[type=range] { width: 100%; accent-color: var(--blue); }
.section-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 18px 0 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* ================= TOASTS ================= */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--border); box-shadow: var(--sh-2); animation: toastIn .26s var(--ease); }
.toast.leaving { animation: toastOut .2s var(--ease) forwards; }
.toast .t-ic { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--blue); }
.toast.ok .t-ic { background: var(--ok); }
.toast.warn .t-ic { background: var(--warn); }
.toast.bad .t-ic { background: var(--bad); }
.toast .t-body b { display: block; font-size: 13px; font-weight: 600; }
.toast .t-body span { font-size: 12px; color: var(--ink-3); }
.toast .t-x { margin-left: auto; border: none; background: none; color: var(--ink-3); font-size: 15px; line-height: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }

/* ================= MENU CONTEXTUEL ================= */
.ctx-menu { position: fixed; z-index: 400; min-width: 190px; padding: 6px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-3); animation: pop .14s var(--ease); }
.ctx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 11px; border: none; background: none; border-radius: 8px; font-size: 13px; color: var(--ink); text-align: left; }
.ctx-menu button:hover { background: var(--paper); }
.ctx-menu button.danger { color: var(--bad); }
.ctx-menu .sep { height: 1px; margin: 5px 6px; background: var(--border); }
.ctx-menu .head { padding: 7px 11px 5px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

/* ================= GRILLE JEV (facteurs, alertes) ================= */
.dim-group { margin-bottom: 12px; }
.dim-title { font-family: var(--f-display); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.fac-block { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.fac-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; flex-wrap: wrap; }
.fac-head .pill { font-size: 10.5px; }
.fac-block input[type=range] { width: 100%; accent-color: var(--blue); }
.fac-def { margin-top: 8px; font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 2px; }
.fac-def b { color: var(--ink-2); font-weight: 600; }
.motif-wrap { margin-top: 8px; }
.motif-wrap input.motif { width: 100%; padding: 8px 11px; border: 1px solid var(--warn); border-radius: 8px; font-size: 12.5px; font-family: var(--f-sans); color: var(--ink); background: var(--warn-bg); }
.alert-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.alert-list { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.alert-list li { font-size: 12px; color: var(--ink-2); padding-left: 12px; position: relative; }
.alert-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--warn); }

/* ================= MIRE — COCKPIT (nouveaux composants) ================= */
.top-search { position: relative; margin-left: 18px; flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.top-search svg { color: var(--ink-3); flex: none; }
.top-search input { border: none; outline: none; background: transparent; font-family: var(--f-sans); font-size: 13px; color: var(--ink); width: 100%; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--white); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-3); padding: 8px; z-index: 60; max-height: 420px; overflow-y: auto; }
.search-results .sr-group { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px 4px; }
.search-results button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.search-results button:hover { background: var(--paper); }
.search-results button span { color: var(--ink-3); font-size: 11.5px; }

/* KPI cliquables */
.stat.clickable { cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease); }
.stat.clickable:hover { border-color: var(--sky); box-shadow: var(--sh-2); transform: translateY(-1px); }
.stat .go { font-size: 12px; color: var(--blue); font-weight: 600; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }

/* À traiter */
.tasks { display: flex; flex-direction: column; gap: 12px; }
.task { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--sh-1); }
.task .t-ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--info-bg); color: var(--blue); }
.task .t-ico svg { width: 20px; height: 20px; }
.task.warn .t-ico { background: var(--warn-bg); color: var(--warn); }
.task.bad .t-ico { background: var(--bad-bg); color: var(--bad); }
.task.ok .t-ico { background: var(--ok-bg); color: var(--ok); }
.task .t-body { flex: 1; min-width: 0; }
.task .t-body b { display: block; font-size: 14px; font-weight: 600; }
.task .t-body span { font-size: 12.5px; color: var(--ink-3); }
.task .t-side { display: flex; align-items: center; gap: 10px; flex: none; }
.task .prio { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.hero-done { text-align: center; padding: 54px 20px; }
.hero-done .big { font-family: var(--f-display); font-size: 24px; font-weight: 700; margin-bottom: 8px; }

/* Étapes (import) */
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--border); background: var(--white); font-size: 12.5px; color: var(--ink-3); }
.step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--paper); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-family: var(--f-mono); }
.step.active { border-color: var(--blue); color: var(--ink); font-weight: 600; }
.step.active .n { background: var(--blue); color: #fff; }
.step.done { color: var(--ok); border-color: rgba(18,128,92,.35); }
.step.done .n { background: var(--ok-bg); color: var(--ok); }

/* Timeline audit */
.tl2 { position: relative; margin-left: 8px; padding-left: 26px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 22px; }
.tl2 .ev { position: relative; }
.tl2 .ev::before { content: ''; position: absolute; left: -33px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--sky); }
.tl2 .ev .ts { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
.tl2 .ev .txt { font-size: 13px; margin-top: 3px; }
.tl2 .ev .txt b { font-weight: 600; }
.tl2 .ev .det { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Assistant */
.assist-orb { position: fixed; right: 24px; bottom: 24px; width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--ink); box-shadow: var(--sh-3); cursor: pointer; z-index: 250; display: flex; align-items: center; justify-content: center; transition: transform .15s var(--ease); }
.assist-orb:hover { transform: translateY(-2px) scale(1.03); }
.assist-orb img { width: 27px; height: auto; }
.assist-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 100px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 6px; border: 2px solid var(--paper); }
.assist-panel { position: fixed; right: 24px; bottom: 94px; width: min(420px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px)); background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--sh-3); z-index: 260; display: flex; flex-direction: column; overflow: hidden; animation: pop .2s var(--ease); }
.assist-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fff, var(--paper)); }
.assist-title { display: flex; align-items: center; gap: 10px; }
.assist-title img { width: 22px; height: auto; }
.assist-title b { font-family: var(--f-display); font-size: 14px; }
.assist-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--may-paper, var(--paper)); }
.am { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.am.bot { background: var(--white); border: 1px solid var(--border); border-bottom-left-radius: 6px; align-self: flex-start; }
.am.user { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.am .am-t { font-weight: 600; margin-bottom: 4px; }
.am .am-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.am .am-actions .chip { font-size: 12px; padding: 6px 12px; }
.assist-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.assist-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--f-sans); font-size: 13px; color: var(--ink); }
.assist-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.14); }

/* Onboarding */
.onb { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(150deg, #fff 0%, var(--paper) 100%); padding: 22px 24px; margin-bottom: 18px; }
.onb h3 { font-size: 17px; margin-bottom: 4px; }
.onb .onb-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.onb .ob { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.onb .ob .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-3); flex: none; }
.onb .ob.done .dot { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.onb .ob button { margin-left: auto; }
.onb .bar { height: 6px; border-radius: 100px; background: var(--paper); overflow: hidden; margin-top: 16px; }
.onb .bar i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--blue), var(--sky)); }

/* Petits extras */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--paper); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-3); }
.kv .v { font-weight: 500; text-align: right; }
.scenario { border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; background: var(--white); }
.scenario.rec { border-color: var(--sky); box-shadow: var(--sh-2); }
.scenario h4 { font-family: var(--f-display); font-size: 14px; margin-bottom: 4px; }
.scenario .cost { font-family: var(--f-mono); font-size: 20px; font-weight: 500; margin: 8px 0 2px; }
.scenario .muted { font-size: 12px; }
.bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bullets li { font-size: 13px; padding-left: 16px; position: relative; }
.bullets li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--sky); }



.kv.dense { padding: 7px 0; }
input[type=file] { font-family: var(--f-sans); font-size: 12.5px; color: var(--ink-2); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--white); color: var(--ink); font-family: var(--f-sans); font-size: 12.5px; cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease); }
input[type=file]::file-selector-button:hover { border-color: var(--blue); color: var(--blue); }

.caret { display: inline-block; margin-left: 1px; opacity: .55; animation: caretblink 1s steps(1) infinite; }
@keyframes caretblink { 50% { opacity: 0; } }




/* ================= MIRE — ITÉRATION 2 (workflow · chat · aide) ================= */
:root { --amber: #D97706; --amber-bg: rgba(217,119,6,.13); --amber-ink: #B45309; }

/* --- navigation latérale : aide --- */
.side-utils { padding: 10px 12px 0; }
.side-help { width: 100%; text-align: left; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 12.5px; font-family: var(--f-sans); cursor: pointer; }
.side-help:hover { border-color: var(--blue); color: var(--blue); }

/* --- coachmark assistant --- */
.coach { position: fixed; right: 24px; bottom: 100px; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(10,31,68,.18); padding: 16px 16px 14px; z-index: 140; animation: fade .25s var(--ease); }
.coach::after { content: ''; position: absolute; right: 26px; bottom: -8px; width: 14px; height: 14px; background: #fff; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); }
.coach b { font-family: var(--f-display); font-size: 13.5px; display: block; margin-bottom: 6px; }
.coach p { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-bottom: 12px; }
.coach .btn { font-size: 12.5px; padding: 8px 14px; }
@media (max-width: 700px) { .coach { right: 12px; left: 12px; width: auto; bottom: 92px; } }

/* --- chat de l'entretien --- */
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.cm { max-width: 86%; }
.cm-t { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.cm-b { padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.cm.mire .cm-b { background: #fff; border: 1px solid var(--border); border-top-left-radius: 4px; color: var(--ink); }
.cm.user { align-self: flex-end; }
.cm.user .cm-b { background: var(--blue); color: #fff; border-top-right-radius: 4px; }
.cm.typing .cm-b { color: var(--ink-3); font-style: italic; display: inline-flex; align-items: center; gap: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--sky); animation: dotp 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotp { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.chat-in { display: flex; flex-direction: column; gap: 10px; }
.chat-in textarea { resize: none; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-family: var(--f-sans); font-size: 13.5px; color: var(--ink); }
.chat-in textarea:focus { outline: 2px solid var(--blue-bg2, rgba(11,92,255,.15)); border-color: var(--blue); }
.chat-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* --- statuts d'avancement de l'entretien --- */
.pstat { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; }
.stat-todo { background: rgba(197,205,213,.25); color: var(--ink-3); }
.stat-cur { background: rgba(11,92,255,.12); color: var(--blue); }
.stat-done { background: var(--ok-bg); color: var(--ok); }
.stat-warn2 { background: var(--amber-bg); color: var(--amber-ink); }

/* --- avancement discret du dossier d'écart --- */
.flow-compact { margin: 14px 0 8px; }
.flow-compact-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; color: var(--ink-3); font-size: 11px; }
.flow-compact-head strong { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.flow-compact-track { height: 2px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: rgba(197,205,213,.38); }
.flow-compact-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

/* --- graphique écarts : lecture analytique horizontale --- */
.gap-chart { margin-top: 22px; }
.gap-axis, .gap-row { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 14px; }
.gap-axis { height: 28px; }
.gap-scale { position: relative; border-bottom: 1px solid var(--border); }
.gap-scale span { position: absolute; bottom: 7px; transform: translateX(-50%); font: 10px var(--f-mono); color: var(--ink-3); }
.gap-scale span:first-child { transform: none; }
.gap-scale span:last-of-type { transform: translateX(-100%); }
.gap-scale b { position: absolute; top: 22px; transform: translateX(-50%); color: var(--warn); font-size: 10px; font-weight: 600; white-space: nowrap; }
.gap-row { width: 100%; align-items: center; min-height: 42px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.gap-row:hover .gap-track { background: rgba(10,31,68,.035); }
.gap-grade { font: 600 12px var(--f-mono); }
.gap-track { position: relative; display: block; height: 24px; border-bottom: 1px solid var(--border); }
.gap-gridline { position: absolute; inset-block: 0; width: 1px; background: rgba(197,205,213,.28); }
.gap-threshold { position: absolute; inset-block: -4px; width: 1px; border-left: 1px dashed var(--warn); z-index: 2; }
.gap-measure { position: absolute; left: 0; top: 12px; height: 3px; background: var(--ink-2); z-index: 3; }
.gap-measure.over { background: var(--warn); }
.gap-track strong { position: absolute; top: -4px; transform: translateX(7px); font: 600 11px var(--f-mono); color: var(--ink-2); z-index: 4; white-space: nowrap; }
.gap-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* --- fiche synthétique d'un groupe --- */
.group-summary-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.group-summary-head h3 { font-size: 17px; }
.group-summary-head p { margin-top: 5px; color: var(--ink-2); font-size: 13px; }
.group-summary-head p span { color: var(--ink-3); margin-left: 8px; }
.gap-summary { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: baseline; text-align: right; }
.gap-summary > span { grid-column: 1; color: var(--ink-3); font-size: 11px; }
.gap-summary strong { grid-column: 2; grid-row: 1 / span 2; font-size: 27px; font-weight: 500; color: var(--ink); }
.gap-summary strong.is-over { color: var(--warn); }
.gap-summary small { grid-column: 1; font-size: 11px; color: var(--ink-2); }
.group-metrics { margin-top: 8px; }
.group-metrics > div { display: grid; grid-template-columns: minmax(180px,1fr) minmax(110px,.55fr) minmax(110px,.55fr); gap: 20px; align-items: center; min-height: 38px; border-bottom: 1px solid var(--paper); font-size: 12.5px; }
.group-metrics > div:last-child { border-bottom: 0; }
.group-metrics strong { font: 500 13px var(--f-mono); color: var(--ink); }
.group-metrics-head { min-height: 31px !important; color: var(--ink-3); font-size: 10px !important; text-transform: uppercase; letter-spacing: .05em; }
.method-intro { margin: 12px 0 8px; color: var(--ink-2); font-size: 12.5px; }

/* --- ancien graphique conservé pour compatibilité, non utilisé --- */
.chart2-wrap { overflow-x: auto; }
.chart2 { position: relative; min-width: 560px; padding: 12px 8px 30px 52px; }
.c2-grid { position: absolute; left: 0; right: 0; bottom: 30px; top: 12px; }
.c2-tick { position: absolute; left: 0; right: 0; height: 0; }
.c2-tick span { position: absolute; left: 0; top: 0; transform: translateY(-50%); font-size: 10px; color: var(--ink-3); font-family: var(--f-mono); }
.c2-tick i { display: block; margin-left: 48px; border-top: 1px solid rgba(197,205,213,.35); }
.c2-threshold-axis { position: absolute; left: 0; width: 48px; height: 0; z-index: 3; }
.c2-threshold-axis span { position: absolute; left: 0; top: 0; transform: translateY(-50%); font-size: 10px; color: var(--amber-ink); font-family: var(--f-mono); font-weight: 700; }
.c2-bars { position: absolute; left: 0; right: 0; top: 12px; bottom: 30px; }
.c2-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--amber); opacity: .9; pointer-events: none; }
.c2-line-lab { position: absolute; right: 4px; font-size: 10px; line-height: 1; color: var(--amber-ink); background: rgba(255,255,255,.88); padding: 1px 0 1px 6px; font-weight: 600; pointer-events: none; }
.c2-bars { display: flex; align-items: flex-end; gap: 14px; padding-left: 52px; padding-right: 8px; }
.c2-bars .colw { position: relative; flex: 1; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.c2-bars .ccol { width: 58%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: var(--blue); transition: height .3s var(--ease); }
.c2-bars .ccol.over { background: var(--amber); }
.c2-bars .cval { position: absolute; bottom: calc(var(--bar-h) + 5px); font-size: 10.5px; line-height: 1; font-family: var(--f-mono); color: var(--ink-2); }
.c2-bars .clab { position: absolute; bottom: -24px; font-size: 10.5px; color: var(--ink-2); font-family: var(--f-mono); }

/* --- scénarios de correction --- */
.scenario.sim { border-style: dashed; }
.scenario.validated { border-color: rgba(18,128,92,.5); background: linear-gradient(180deg, rgba(18,128,92,.05), #fff 60%); }

/* --- prévisualisation de rapport --- */
.rp-doc { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0 0 18px; max-height: 62vh; overflow-y: auto; }
.rp-head { background: var(--encre, #0A1F44); color: #fff; padding: 18px 22px 16px; border-radius: 10px 10px 0 0; }
.rp-title { font-family: var(--f-display); font-size: 17px; font-weight: 700; }
.rp-sub { font-size: 11.5px; opacity: .8; margin-top: 4px; }
.rp-meta { font-size: 10.5px; opacity: .65; margin-top: 2px; }
.rp-sec { padding: 14px 22px 0; }
.rp-sec h4 { font-family: var(--f-display); font-size: 13px; margin-bottom: 8px; }
.rp-sec p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 6px; }
.rp-tbl { width: 100%; margin-top: 6px; }
.rp-tbl td { font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid rgba(197,205,213,.35); }

/* --- « pourquoi ce niveau » --- */
.fac-why { margin: 0 0 10px; }
.fac-why summary { font-size: 12px; color: var(--blue); cursor: pointer; }
.fac-why p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin-top: 6px; background: var(--paper); border-radius: 8px; padding: 9px 11px; }

/* --- surbrillance ciblée --- */
.flash { animation: flashbg 2.2s var(--ease); }
@keyframes flashbg { 0% { background: rgba(11,92,255,.14); } 100% { background: transparent; } }
tr.flash td { animation: flashbg 2.2s var(--ease); }

/* --- visite guidée --- */
#tourRoot { position: fixed; inset: 0; z-index: 200; }
.tour-dim { position: absolute; inset: 0; background: transparent; }
.tour-spot { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10,31,68,.58); border: 2px solid #fff; pointer-events: none; animation: fade .2s var(--ease); }
.tour-pop { position: absolute; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 24px 60px rgba(10,31,68,.3); }
.tour-pop .tp-step { font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 6px; }
.tour-pop b { font-family: var(--f-display); font-size: 14px; }
.tour-pop p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin: 6px 0 14px; }
.tp-btns { display: flex; gap: 8px; align-items: center; }
.tp-btns .btn { padding: 7px 12px; font-size: 12.5px; }
.setup-reminder { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #C9D8F5; border-radius: 12px; background: #F4F7FD; }
.setup-reminder > div { flex: 1; min-width: 0; }
.setup-reminder b { display: block; font-size: 13px; margin-bottom: 2px; }
.setup-reminder p { color: var(--ink-3); font-size: 12px; }
.method-note { font-size: 11.5px; line-height: 1.55; color: var(--ink-3); }
.method-details summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); list-style: none; }
.method-details summary::-webkit-details-marker { display: none; }
.method-details summary::marker { display: none; content: ''; }
.method-toggle::after { content: 'Afficher les détails'; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.method-details[open] .method-toggle::after { content: 'Masquer les détails'; }
.method-details[open] summary { margin-bottom: 12px; }
.method-details .bullets { gap: 0; border-top: 1px solid var(--border); }
.method-details .bullets li { display: grid; grid-template-columns: minmax(145px,.55fr) minmax(0,1fr); gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--paper); color: var(--ink-2); }
.method-details .bullets li b { color: var(--ink); font-weight: 600; }
.method-details .bullets li::before { display: none; }
.method-formula { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--ink-3); font: 11.5px var(--f-mono); }

@media (max-width: 1000px) {
  .stats, .stats.cols4, .stats.cols5 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 220px; }
  .login-brand::after { opacity: .07; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 120; transform: translateX(-100%); transition: transform .24s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .side-close { display: inline-flex; }
  .burger { display: inline-flex; }
  .view { padding: 18px 16px 32px; }
  .topbar { padding: 14px 16px; }
  .table-card { overflow-x: auto; }
  table.tbl { min-width: 560px; }
  .stats, .stats.cols4, .stats.cols5 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgba(10,31,68,.38); z-index: 110; animation: fade .18s var(--ease); }
}
@media (max-width: 700px) {
  #licencePill { display: none; }
  .tbl .hide-m { display: none; }
  table.tbl { min-width: 420px; }
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .top-titles { order: 1; flex: 1; min-width: 0; }
  .top-right { order: 2; }
  .top-search { order: 3; flex-basis: 100%; margin-left: 0; max-width: none; }
  .flow-compact-head { gap: 8px; }
  .group-summary-head { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .gap-summary { text-align: left; justify-content: start; }
  .group-metrics > div { grid-template-columns: minmax(125px,1fr) minmax(82px,.6fr) minmax(82px,.6fr); gap: 10px; }
}
@media (max-width: 560px) {
  .toasts { left: 12px; right: 12px; max-width: none; }
  .modal { max-width: none; }
  .tbl thead th, .tbl tbody td { padding: 10px 12px; }
  .toolbar .btn { width: 100%; }
  .toolbar .chip { flex: 0 0 auto; text-align: left; }
  .chart { overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
  .chart .colw { min-width: 54px; }
  .chart .colw .clab { font-size: 9.5px; }
  .list-bars .name { width: 72px; }
  .card-head { flex-wrap: wrap; }
}

/* Ajustements du parcours d’accueil */
.setup-foot > div { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; }
.setup-foot .setup-defer { font-size:11.5px; padding:0; text-decoration:underline; text-underline-offset:3px; }
.audio-notice .modal-body p { font-size:14px !important; }
.audio-notice .modal-foot { gap:8px; }
.audio-notice .modal-foot .btn { font-size:12.5px; padding:8px 13px; flex:none; min-height:0; }
.tour-example-label { margin-left:8px; color:var(--ink-3); font:400 11px var(--f-sans); }

.ecarts-results { scroll-margin-top:100px; }
.ecarts-results:focus { outline:2px solid rgba(11,92,255,.2); outline-offset:3px; }
.ecarts-results-head { padding:16px 20px; display:flex; align-items:baseline; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); }
.ecarts-results-head h3 { font-size:14px; }
.ecarts-results-head span { font-size:12px; }

.setup-foot .setup-defer.is-narrated { color:var(--blue-ink); background:#EAF1FF; border-radius:6px; box-shadow:0 0 0 6px #EAF1FF; transition:color .25s, box-shadow .25s; }

.work-groups { display:grid; gap:12px; }
.work-group { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--border); }
.work-group:last-child { border-bottom:0; }
.work-group h4 { font-size:14px; font-weight:600; }
.work-group p { color:var(--ink-3); font-size:12px; margin-top:4px; }
.work-group-actions { display:flex; gap:6px; flex-wrap:wrap; flex-shrink:0; }
.work-group-actions .btn { padding:7px 10px; font-size:12px; }
.group-members { display:grid; gap:8px; max-height:150px; overflow:auto; font-size:13px; }
.group-members input,.group-post-list input { accent-color:var(--blue); }
.group-post-tools { display:flex; gap:8px; }
.group-post-tools input,.group-post-tools select,.group-filter select { min-width:0; border:1px solid var(--border); border-radius:8px; padding:9px 11px; background:#fff; color:var(--ink); font:inherit; font-size:13px; }
.group-post-tools input { flex:1; }
.group-post-list { max-height:250px; overflow:auto; border:1px solid var(--border); border-radius:9px; padding:8px 12px; }
.group-post-list label { display:flex; gap:10px; align-items:center; padding:8px 0; font-size:13px; border-bottom:1px solid var(--paper); }
.group-post-list small { display:block; color:var(--ink-3); font-size:11px; }
.group-selection-actions { display:flex; gap:18px; margin:10px 0; }
.group-filter { gap:10px; flex-wrap:wrap; }
.group-filter label,.group-filter span { font-size:12px; }
@media(max-width:700px) { .work-group { align-items:flex-start; flex-direction:column; } .group-post-tools { flex-direction:column; } }
