:root{
  --bg:#F3F4EF; --surface:#FFFFFF; --surface-2:#EAECE3; --ink:#13170F; --ink-muted:#59614F; --border:#DBDECF;
  --accent:#C81E38; --accent-ink:#FFFFFF; --good:#1F8A4C; --warn:#B7791F; --bad:#C81E38;
  --good-soft:rgba(31,138,76,.12); --warn-soft:rgba(237,161,0,.18); --bad-soft:rgba(200,30,56,.10);
  --shadow:0 24px 60px -24px rgba(19,23,15,.35);
  --font-display:'Bricolage Grotesque','Segoe UI',system-ui,sans-serif;
  --font-body:'Public Sans','Segoe UI',system-ui,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0E110B; --surface:#171B12; --surface-2:#1F2418; --ink:#EEF0E8; --ink-muted:#A3AB97; --border:#2A3023;
    --accent:#FF5A70; --accent-ink:#13170F; --good:#3CCB7A; --warn:#F0B429; --bad:#FF6B81;
    --good-soft:rgba(60,203,122,.14); --warn-soft:rgba(240,180,41,.16); --bad-soft:rgba(255,107,129,.14);
    --shadow:0 24px 60px -24px rgba(0,0,0,.7);
  }
}
*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html,body{ margin:0; }
body{ background:var(--bg); color:var(--ink); font:15px/1.5 var(--font-body); -webkit-font-smoothing:antialiased; min-height:100vh; }
h1,h2,h3,h4{ font-family:var(--font-display); margin:0 0 8px; letter-spacing:-.01em; }
h1{ font-size:26px; } h2{ font-size:22px; display:inline-block; margin-right:10px; } h3{ font-size:17px; } h4{ font-size:14px; margin:16px 0 6px; color:var(--ink-muted); text-transform:uppercase; letter-spacing:.04em; }
p{ margin:0 0 12px; }
code{ font-family:'IBM Plex Mono',ui-monospace,monospace; font-size:.9em; background:var(--surface-2); padding:1px 6px; border-radius:5px; }
.muted{ color:var(--ink-muted); } .small{ font-size:13px; } .r{ text-align:right; } .nowrap{ white-space:nowrap; } .grow{ flex:1; }

/* écrans d'accès */
.center{ max-width:440px; margin:0 auto; padding:56px 20px; }
.center .brand{ justify-content:center; margin-bottom:22px; }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:26px; box-shadow:var(--shadow); }
.card form label{ display:block; font-weight:600; font-size:13px; margin:14px 0 6px; }
.center-img{ display:flex; justify-content:center; margin:10px 0 14px; }
.qr{ background:#fff; padding:8px; border-radius:10px; border:1px solid var(--border); }
.secret{ display:block; word-break:break-all; padding:8px 10px; margin-bottom:12px; }
details{ margin:6px 0 10px; }
input.code{ font:600 22px/1 'IBM Plex Mono',monospace; letter-spacing:.35em; text-align:center; }

/* marque */
.brand{ display:flex; align-items:center; gap:10px; font:700 19px/1 var(--font-display); }
.brand small{ font:500 11px/1 'IBM Plex Mono',monospace; color:var(--ink-muted); text-transform:uppercase; letter-spacing:.08em; padding:3px 7px; border:1px solid var(--border); border-radius:99px; }
.brand svg{ color:var(--ink); }

/* barre du haut */
.topbar{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 24px; background:var(--surface); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.who{ font-size:13px; }
.wide-main{ max-width:1280px; margin:0 auto; padding:24px; }

/* champs, boutons */
input,select,textarea{ width:100%; font:inherit; color:var(--ink); background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
input[type=checkbox]{ width:auto; }
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,tr:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
input:disabled{ opacity:.5; }
.btn{ font:600 14px/1 var(--font-body); padding:10px 16px; border-radius:99px; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; white-space:nowrap; }
.btn:hover{ background:var(--surface-2); }
.btn.primary{ background:var(--ink); color:var(--bg); border-color:var(--ink); }
.btn.primary:hover{ opacity:.88; background:var(--ink); }
.btn.danger{ color:var(--bad); border-color:var(--bad); background:transparent; }
.btn.danger:hover{ background:var(--bad-soft); }
.btn.sm{ padding:6px 12px; font-size:13px; }
.btn.wide{ width:100%; margin-top:16px; }
.btn[disabled]{ opacity:.45; cursor:not-allowed; }
.link{ background:none; border:0; color:var(--ink-muted); text-decoration:underline; cursor:pointer; font:inherit; display:block; margin:14px auto 0; }
.row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .row.end{ justify-content:flex-end; margin-top:14px; }
.field{ display:flex; flex-direction:column; gap:5px; margin-bottom:12px; }
.field label{ font-weight:600; font-size:13px; display:flex; flex-direction:column; gap:5px; }
.field label.inline{ flex-direction:row; align-items:center; gap:6px; font-weight:400; margin-top:4px; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; } .grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
@media (max-width:620px){ .grid2,.grid3{ grid-template-columns:1fr; } }
.msg{ border-radius:12px; padding:10px 14px; margin:10px 0; font-size:14px; border:1px solid var(--border); }
.msg.err{ background:var(--bad-soft); border-color:var(--bad); } .msg.info{ background:var(--surface-2); } .msg.warn{ background:var(--warn-soft); border-color:var(--warn); display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }

/* indicateurs */
.kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:20px; }
.kpi{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:14px 16px; }
.kpi .v{ font:700 28px/1.1 var(--font-display); } .kpi .l{ color:var(--ink-muted); font-size:13px; margin-top:2px; }
.kpi.warn .v{ color:var(--warn); } .kpi.bad .v{ color:var(--bad); }
.toolbar{ display:flex; gap:10px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.toolbar input[type=search]{ max-width:280px; } .toolbar select{ max-width:220px; }

/* tableaux */
.tablewrap{ overflow-x:auto; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.tbl{ width:100%; border-collapse:collapse; }
.tbl th,.tbl td{ padding:11px 14px; text-align:left; border-bottom:1px solid var(--border); vertical-align:middle; }
.tbl tr:last-child td{ border-bottom:0; }
.tbl th{ font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-muted); font-weight:600; background:var(--surface-2); white-space:nowrap; }
.tbl th .th{ all:unset; cursor:pointer; } .tbl th .th:focus-visible{ outline:2px solid var(--accent); }
.tbl td.name,.name{ font-weight:600; }
.tbl.small th,.tbl.small td{ padding:8px 12px; font-size:13px; }
tr.clickable{ cursor:pointer; } tr.clickable:hover td{ background:var(--surface-2); }
.empty{ text-align:center; color:var(--ink-muted); padding:28px !important; }
.foot{ margin-top:10px; font-size:13px; }
.badge{ display:inline-block; white-space:nowrap; font-size:12px; font-weight:600; padding:3px 10px; border-radius:99px; }
.badge.good{ background:var(--good-soft); color:var(--good); } .badge.warn{ background:var(--warn-soft); color:var(--warn); } .badge.bad{ background:var(--bad-soft); color:var(--bad); } .badge.neutral{ background:var(--surface-2); color:var(--ink-muted); }
.usage{ display:flex; flex-direction:column; gap:4px; min-width:90px; }
.usage .num{ font-size:13px; font-variant-numeric:tabular-nums; }
.usage .bar{ height:5px; border-radius:99px; background:var(--surface-2); overflow:hidden; display:block; }
.usage .bar i{ display:block; height:100%; background:var(--good); border-radius:99px; }
.usage.warn .bar i{ background:var(--warn); } .usage.full .bar i{ background:var(--bad); }
.usage.full .num{ color:var(--bad); font-weight:600; }

/* fenêtres */
.backdrop{ position:fixed; inset:0; background:rgba(10,12,8,.55); display:flex; align-items:center; justify-content:center; padding:20px; z-index:50; }
.backdrop.side{ justify-content:flex-end; align-items:stretch; padding:0; }
.modal{ background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow); padding:24px; width:100%; max-width:520px; max-height:90vh; overflow:auto; }
.modal.big{ max-width:980px; }
.drawer{ background:var(--bg); width:100%; max-width:760px; height:100%; overflow:auto; padding:22px 24px 40px; border-left:1px solid var(--border); box-shadow:var(--shadow); }
.dhead{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:6px; }
.sec{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:18px 20px; margin-top:16px; }
.sec .tablewrap{ border-radius:10px; }
.toasts{ position:fixed; right:18px; bottom:18px; display:flex; flex-direction:column; gap:8px; z-index:100; max-width:calc(100vw - 36px); }
.toast{ background:var(--ink); color:var(--bg); padding:11px 16px; border-radius:12px; font-size:14px; box-shadow:var(--shadow); }
.toast.err{ background:var(--bad); color:#fff; }
@media (prefers-reduced-motion:no-preference){ .toast{ animation:in .2s ease-out; } @keyframes in{ from{ opacity:0; transform:translateY(8px); } } }

/* ---- cartes d'essais */
.cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.card-essai{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:16px; display:flex; flex-direction:column; gap:6px; }
.card-essai .btn.wide{ margin-top:6px; padding:14px 16px; }
.ce-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.ce-nom{ margin:0; font-size:17px; text-transform:none; letter-spacing:0; color:var(--ink); }
.lastbox{ margin-top:8px; font-size:14px; }
.lastbox summary{ cursor:pointer; color:var(--ink-muted); }
.rel{ list-style:none; padding:0; margin:8px 0 0; display:flex; flex-direction:column; gap:8px; }
.rel li{ padding-bottom:8px; border-bottom:1px solid var(--border); } .rel li:last-child{ border-bottom:0; }

/* ---- saisie d'un relevé (plein écran, pensée pour le téléphone) */
.fs{ position:fixed; inset:0; background:var(--bg); z-index:60; overflow:auto; -webkit-overflow-scrolling:touch; }
.fshead{ position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 18px; background:var(--surface); border-bottom:1px solid var(--border); }
.fshead h2{ margin:2px 0; font-size:20px; display:block; }
.fsbody{ max-width:560px; margin:0 auto; padding:18px 18px 48px; }
.fsec{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:16px; margin-bottom:14px; }
.fsec label{ display:block; font-weight:600; font-size:14px; margin-bottom:8px; }
.fsec h3{ margin:0 0 2px; }
.fsec input[type=date], .fsec input[type=text]{ font-size:18px; padding:13px 14px; }
.fsec textarea{ font-size:16px; }
.segrow{ margin-top:12px; }
.seglbl{ font-weight:600; font-size:14px; margin-bottom:6px; }
.seg{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.segbtn{ min-height:46px; font:600 17px var(--font-body); border-radius:12px; border:1px solid var(--border); background:var(--surface-2); color:var(--ink); cursor:pointer; }
.segbtn.on{ background:var(--ink); color:var(--bg); border-color:var(--ink); }
.segbtn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.thumbs{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.thumbs .th{ position:relative; }
.thumbs img{ border-radius:10px; object-fit:cover; display:block; border:1px solid var(--border); }
.thumbs .x{ position:absolute; top:-6px; right:-6px; width:26px; height:26px; border-radius:99px; border:1px solid var(--border); background:var(--surface); color:var(--ink); font-size:16px; line-height:1; cursor:pointer; }
.hide{ display:none; }
.fsbody .btn.wide{ padding:16px; font-size:16px; margin-top:12px; }
.fsbody.done{ text-align:center; padding-top:80px; }
.fsbody.done .row{ justify-content:center; margin-top:18px; }
.tick{ width:64px; height:64px; margin:0 auto 14px; border-radius:99px; background:var(--good-soft); color:var(--good); font-size:34px; line-height:64px; font-weight:700; }

/* ---- espace obtenteur : fiche d'essai, équipe, notifications */
.fs.top{ z-index:61; }
.bell{ position:relative; }
.bellcount{ display:inline-block; min-width:20px; margin-left:8px; padding:2px 6px; border-radius:99px; background:var(--accent); color:var(--accent-ink); font-size:12px; font-weight:700; line-height:1.3; text-align:center; }
.btn.ghost{ background:transparent; }
.card-essai .btn.wide.ghost{ padding:11px 16px; margin-top:0; }
.small.tight{ margin:0; }
.sec .dhead h3{ margin:0; }
.acts{ white-space:nowrap; } .acts .btn{ margin-left:6px; }
.tabs{ display:flex; gap:4px; padding:0 18px; background:var(--surface); border-bottom:1px solid var(--border); overflow-x:auto; }
.tab{ font:600 14px var(--font-body); padding:12px 16px; border:0; border-bottom:3px solid transparent; background:none; color:var(--ink-muted); cursor:pointer; white-space:nowrap; }
.tab.on{ color:var(--ink); border-bottom-color:var(--accent); }
.tab:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
.fsbody.xl{ max-width:900px; }
.obslist{ display:flex; flex-direction:column; gap:12px; }
.obs{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:14px 16px; }
.obs-top{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.obs-poids{ margin:8px 0 4px; font-size:15px; } .obs-poids strong{ font:700 22px var(--font-display); }
.obs-com{ margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.chips{ display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 4px; }
.chip{ font-size:13px; padding:3px 10px; border-radius:99px; background:var(--surface-2); border:1px solid var(--border); }
.chip.sani{ background:var(--warn-soft); border-color:transparent; } .chip.sani.hot{ background:var(--bad-soft); color:var(--bad); font-weight:600; }
.photos{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.phbtn{ padding:0; border:0; background:none; cursor:zoom-in; border-radius:10px; }
.phbtn img{ display:block; width:120px; height:120px; object-fit:cover; border-radius:10px; border:1px solid var(--border); }
.phbtn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.zoom{ display:block; max-width:100%; max-height:75vh; margin:0 auto; border-radius:10px; }
.crit{ display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.critrow{ display:flex; gap:8px; width:100%; max-width:420px; } .critrow input{ flex:1; }
.fsec .field label{ display:flex; flex-direction:column; gap:5px; font-weight:600; font-size:13px; margin-bottom:0; }
.fsec .field label.inline{ flex-direction:row; align-items:center; gap:8px; font-weight:400; font-size:15px; }
.fsec .grid2 .field, .fsec .grid3 .field{ margin-bottom:12px; }
.fsec input[type=text]{ font-size:16px; padding:10px 12px; }
.fsec.dz{ border-color:var(--bad); }
.checklist{ display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.checklist label.inline{ display:flex; align-items:center; gap:8px; font-weight:400; font-size:15px; margin:0; }
.checklist input[type=checkbox]{ width:20px; height:20px; }
.lbl{ font-weight:600; font-size:13px; }
.qrrow{ display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.qrbox{ background:#fff; padding:6px; border-radius:12px; border:1px solid var(--border); line-height:0; }
.urlcode{ word-break:break-all; display:inline-block; }
.notifs{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.notif{ width:100%; text-align:left; display:flex; flex-direction:column; gap:2px; padding:10px 14px; border-radius:12px; border:1px solid var(--border); background:var(--surface); color:var(--ink); font:inherit; cursor:pointer; }
.notif.unread{ border-color:var(--accent); background:var(--bad-soft); } .notif.unread .ntext{ font-weight:600; }
.notif:hover{ background:var(--surface-2); }

/* ---- affiche imprimable (QR code d'un essai) */
.printsheet{ display:none; }
@media print{
  body.printing > *:not(.printsheet){ display:none !important; }
  body.printing{ background:#fff; color:#000; }
  .printsheet{ display:block; text-align:center; padding:40px 24px; font-family:var(--font-body); color:#000; }
  .printsheet h1{ font-size:44px; margin:10px 0; } .ps-org{ font-size:18px; letter-spacing:.08em; text-transform:uppercase; }
  .ps-sub{ font-size:20px; } .ps-help{ font-size:24px; font-weight:700; margin:18px 0 6px; } .ps-url{ font-size:12px; color:#444; word-break:break-all; }
  .printsheet svg{ width:360px; height:360px; margin:20px auto; display:block; }
}

/* ---- facturation (super-administrateur) */
#dtabs{ padding:0 24px; }
.linkbtn{ background:none; border:0; padding:0; font:inherit; font-weight:600; color:var(--ink); text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:var(--border); text-underline-offset:3px; }
.linkbtn:hover{ text-decoration-color:var(--ink); }
.badge.sm{ font-size:11px; padding:1px 8px; margin-left:6px; }
.bad-text{ color:var(--bad); font-weight:600; }
.kpi .l.small{ font-size:12px; margin-top:0; }
.bars{ display:grid; grid-template-columns:repeat(12,1fr); gap:6px; align-items:end; height:190px; margin-top:8px; }
.barcol{ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; min-width:0; }
.barwrap{ width:100%; flex:1; display:flex; align-items:flex-end; min-height:0; }
.bar2{ width:100%; background:var(--good); border-radius:6px 6px 0 0; }
.barcol:last-child .bar2{ background:var(--accent); }
.barval{ font-variant-numeric:tabular-nums; min-height:18px; color:var(--ink-muted); }
.barlbl{ margin-top:4px; color:var(--ink-muted); text-transform:capitalize; }
.modal.wide{ max-width:680px; }
.facts{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px 18px; margin:14px 0; }
.fact > div:last-child{ font-size:15px; }
.ttc{ margin:-2px 0 12px; font-weight:600; font-variant-numeric:tabular-nums; }
.sec .dhead{ align-items:center; flex-wrap:wrap; }
@media (max-width:620px){ #dtabs{ padding:0 12px; } .bars{ gap:3px; } .barval{ display:none; } }

/* ---- simulateur et document de devis */
.simgrid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:24px; align-items:start; }
@media (max-width:900px){ .simgrid{ grid-template-columns:1fr; } }
.simgrid h4{ margin:14px 0 8px; }
.simres{ position:sticky; top:12px; background:var(--surface-2); border:1px solid var(--border); border-radius:16px; padding:16px; }
.simres .tablewrap{ background:var(--surface); }
.tbl tr.once td{ background:var(--warn-soft); }
.totals{ margin:12px 0 4px; display:flex; flex-direction:column; gap:4px; }
.totals div{ display:flex; justify-content:space-between; gap:12px; }
.totals dt{ color:var(--ink-muted); } .totals dd{ margin:0; font-variant-numeric:tabular-nums; }
.totals .sum{ border-top:1px solid var(--border); padding-top:6px; margin-top:4px; } .totals .sum dt{ color:var(--ink); font-weight:600; }
.totals .big dd{ font:700 22px var(--font-display); }
.paper{ background:#fff; color:#111; border:1px solid var(--border); border-radius:12px; padding:22px; margin:12px 0; max-height:58vh; overflow:auto; }
.modal.xl{ max-width:860px; }
.todo{ background:#fff3a3; color:#5a4a00; padding:0 4px; border-radius:3px; }
.devdoc{ font:13px/1.45 var(--font-body); color:#111; }
.devdoc .pre{ white-space:pre-line; } .devdoc .small{ font-size:12px; } .devdoc .muted{ color:#666; }
.dd-top{ display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:18px; }
.dd-title{ text-align:right; } .dd-title h1{ font-size:30px; margin:0 0 4px; letter-spacing:.06em; color:#111; }
.dd-to{ background:#f3f3ef; border-radius:8px; padding:10px 14px; margin-bottom:14px; max-width:340px; }
.dd-obj{ margin:12px 0; }
.dd-table, .dd-totals{ width:100%; border-collapse:collapse; margin-bottom:12px; }
.dd-table th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:#555; border-bottom:2px solid #111; padding:6px 8px; }
.dd-table td{ padding:6px 8px; border-bottom:1px solid #ddd; vertical-align:top; }
.dd-table tr.sect td{ background:#efefe8; font-weight:700; font-size:12px; }
.dd-table .r, .dd-totals .r{ text-align:right; } .dd-table th.r{ text-align:right; }
.dd-totals{ width:auto; margin-left:auto; min-width:300px; }
.dd-totals td{ padding:4px 8px; } .dd-totals tr.sum td{ border-top:1px solid #111; font-weight:700; } .dd-totals tr.big td{ font-size:16px; }
.dd-tvamention{ margin:8px 0 4px; text-align:right; font-style:italic; font-size:.92em; }
.dd-cond{ margin-top:14px; border-top:1px solid #ddd; padding-top:8px; }
.dd-sign{ margin-top:22px; border:1px solid #999; border-radius:6px; min-height:110px; padding:10px 14px; max-width:340px; }
@media print{
  .printsheet.devprint{ text-align:left; padding:0; }
  .printsheet.devprint .devdoc{ font-size:12px; }
  .printsheet.devprint .dd-title h1{ font-size:28px; }
  .printsheet.devprint .todo{ background:none; color:#999; }
  @page{ margin:16mm; }
}

/* ---- comparaison des variétés : jetons de couleur des séries (palette validée avec le script de l'atelier dataviz) */
:root{
  --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --series-4:#eda100; --series-5:#e87ba4; --series-6:#008300;
  --temoin:#6f6e68; --div-pos:#2a78d6; --div-neg:#e34948; --chart-grid:#e1e0d9; --chart-axis:#c3c2b7; --chart-text:#59614F;
}
@media (prefers-color-scheme: dark){ :root{
  --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500; --series-5:#d55181; --series-6:#0ca30c;
  --temoin:#a8a79c; --div-pos:#3987e5; --div-neg:#e66767; --chart-grid:#2c3224; --chart-axis:#3a4230; --chart-text:#A3AB97;
} }
.fsbody.xxl{ max-width:1180px; }
.cmp-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.cmp-essais{ margin-top:6px; } .cmp-essais summary{ cursor:pointer; font-weight:600; font-size:14px; }
.cmp-sum{ margin:4px 2px 0; font-size:14.5px; }
.cmp-two{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
@media (max-width:900px){ .cmp-two{ grid-template-columns:1fr; } }
figure.fig{ margin:8px 0 0; min-width:0; } figure.fig figcaption{ font-weight:600; font-size:14px; margin-bottom:4px; }
figure.fig.radar{ max-width:520px; margin-inline:auto; }
svg.chart{ display:block; max-width:100%; height:auto; overflow:visible; }
svg.chart .grid{ stroke:var(--chart-grid); stroke-width:1; fill:none; } svg.chart .axis{ stroke:var(--chart-axis); stroke-width:1; fill:none; }
svg.chart .cross{ stroke:var(--chart-axis); stroke-width:1; stroke-dasharray:3 3; }
svg.chart .ctext{ fill:var(--chart-text); font:12px var(--font-body); } svg.chart .ctext.faint{ opacity:.7; }
svg.chart .clabel{ fill:var(--ink); font:13px var(--font-body); } svg.chart .clabel.strong{ font-weight:700; }
svg.chart .cval{ fill:var(--ink); font:600 12.5px var(--font-body); font-variant-numeric:tabular-nums; }
svg.chart .hit{ cursor:crosshair; }
.c1{ color:var(--series-1); } .c2{ color:var(--series-2); } .c3{ color:var(--series-3); } .c4{ color:var(--series-4); } .c5{ color:var(--series-5); } .c6{ color:var(--series-6); } .ct{ color:var(--temoin); }
.bar-cb{ color:var(--series-1); } .bar-ct{ color:var(--temoin); } .bar-pos{ color:var(--div-pos); } .bar-neg{ color:var(--div-neg); }
svg .dash{ stroke-dasharray:6 4; } svg .off{ color:var(--chart-axis); }
.legend{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.chip{ display:inline-flex; align-items:center; gap:7px; font:500 13.5px var(--font-body); padding:6px 12px 6px 9px; border-radius:99px; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; }
.chip.on{ border-color:var(--ink); } .chip:not(.on){ color:var(--ink-muted); background:var(--surface-2); } .chip:hover{ background:var(--surface-2); }
.cmp-tip{ position:fixed; z-index:90; pointer-events:none; background:var(--ink); color:var(--bg); padding:8px 11px; border-radius:10px; font-size:13px; line-height:1.4; box-shadow:var(--shadow); max-width:260px; }
.cmp-tip .tt{ font-weight:700; } .cmp-tip .muted{ color:inherit; opacity:.8; }
table.heatmap td.heat{ text-align:right; font-variant-numeric:tabular-nums; min-width:76px; }
.chips .chip.par{ background:var(--good-soft); border-color:transparent; font-weight:600; cursor:default; }
.modals{ display:flex; flex-direction:column; gap:10px; }
.modrow{ display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:10px; align-items:center; }
.modcode{ white-space:nowrap; }
@media (max-width:620px){ .modrow{ grid-template-columns:1fr auto; } .modrow .modcode{ grid-column:1/-1; justify-self:start; } }
input[type=radio]{ width:auto; accent-color:var(--good); }
.seg.segwrap{ display:flex; flex-wrap:wrap; gap:8px; } .seg.segwrap .segbtn{ min-width:64px; padding:0 18px; }

figure.fig.line{ max-width:820px; }

/* ---- carte des essais (pastilles regroupées, régions, légende) */
:root{ --map-sea:#ECEFF0; --map-land:#E6EAEA; --map-line:#CBD2D3; --map-reg:#F5F5F3; --map-regline:#97A0A1; --map-dep:#DCE0DD; --map-dot:#263238; --map-dot-ink:#FFFFFF; }
@media (prefers-color-scheme: dark){ :root{ --map-sea:#0C100A; --map-land:#141910; --map-line:#27301F; --map-reg:#1D2318; --map-regline:#5A6650; --map-dep:#2B3322; --map-dot:#D6DDCF; --map-dot-ink:#13170F; } }
.mapwrap{ position:relative; margin-top:8px; }
.map{ position:relative; height:440px; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--map-sea); touch-action:none; user-select:none; }
.map.tall{ height:min(70vh,740px); }
.mapsvg{ width:100%; height:100%; display:block; cursor:grab; }
.map.picking .mapsvg{ cursor:crosshair; }
.mapsvg .sea{ fill:var(--map-sea); }
.mapsvg .land{ fill:var(--map-land); stroke:var(--map-line); stroke-width:.8; stroke-linejoin:round; }
.mapsvg .reg{ fill:var(--map-reg); stroke:var(--map-regline); stroke-width:1.1; stroke-linejoin:round; }
.mapsvg .dep{ fill:none; stroke:var(--map-dep); stroke-width:.8; stroke-linejoin:round; }
.mapsvg .pt, .mapsvg .cl{ cursor:pointer; outline:none; }
.mapsvg .halo{ fill:currentColor; opacity:.16; } .mapsvg .dotc{ fill:currentColor; stroke:var(--surface); stroke-width:2; }
.mapsvg .dott{ fill:#fff; font:700 12px var(--font-body); pointer-events:none; }
.mapsvg .pt.cu{ color:var(--map-dot); } .mapsvg .pt.cu .dott{ fill:var(--map-dot-ink); }
.mapsvg .pt.c2 .dott, .mapsvg .pt.c4 .dott, .mapsvg .pt.c5 .dott{ fill:#13170F; }
.mapsvg .selring{ stroke:none; } .mapsvg .pt.sel .selring, .mapsvg .pt:focus-visible .selring, .mapsvg .cl:focus-visible .clc{ stroke:var(--ink); stroke-width:2.5; }
.mapsvg .clhalo{ fill:var(--accent); opacity:.2; } .mapsvg .clc{ fill:var(--accent); stroke:var(--surface); stroke-width:2; } .mapsvg .clt{ fill:#fff; font:700 14px var(--font-body); pointer-events:none; }
.mapsvg .maplabel{ fill:var(--ink); font:600 12px var(--font-body); paint-order:stroke; stroke:var(--map-reg); stroke-width:4px; stroke-linejoin:round; pointer-events:none; }
.mapsvg .pickring{ stroke:var(--series-2); stroke-width:2; stroke-dasharray:4 3; }
.mapctrl{ position:absolute; top:10px; left:10px; display:flex; flex-direction:column; gap:6px; }
.mapctrl .btn{ width:34px; padding:7px 0; font-size:16px; line-height:1; background:var(--surface); }
.mappills{ position:absolute; top:10px; right:10px; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; max-width:calc(100% - 64px); }
.mappills .pill{ background:var(--surface); border:1px solid var(--border); border-radius:99px; padding:5px 13px; font-size:13px; box-shadow:0 1px 3px rgba(0,0,0,.08); } .mappills .pill b{ color:var(--accent); font-weight:700; }
.maplegend2{ position:absolute; left:10px; bottom:10px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:8px 12px; box-shadow:0 1px 3px rgba(0,0,0,.08); font-size:12.5px; display:flex; flex-direction:column; gap:3px; max-width:min(300px,calc(100% - 20px)); }
.maplegend2 .lg-t{ font:700 11px var(--font-body); letter-spacing:.08em; text-transform:uppercase; color:var(--ink-muted); }
.maplegend2 .lg{ display:flex; align-items:center; gap:6px; }
.maplegend2 button.lg{ background:none; border:0; padding:0; font:inherit; text-align:left; cursor:pointer; color:var(--ink); text-decoration:underline; text-decoration-color:var(--border); }
.maplegend2 svg.cu{ color:var(--map-dot); } .maplegend2 svg .dotc{ fill:currentColor; } .maplegend2 svg .dott{ fill:#fff; font:700 10px var(--font-body); } .maplegend2 svg.cu .dott{ fill:var(--map-dot-ink); }
.maplegend2 svg.c2 .dott, .maplegend2 svg.c4 .dott, .maplegend2 svg.c5 .dott{ fill:#13170F; }
.maplegend2 .clhalo{ fill:var(--accent); opacity:.2; } .maplegend2 .clc{ fill:var(--accent); } .maplegend2 .dothollow{ fill:none; stroke:var(--ink-muted); stroke-width:1.6; stroke-dasharray:3 2; }
.maphint{ position:absolute; left:50%; top:12px; transform:translateX(-50%); background:var(--ink); color:var(--bg); padding:6px 12px; border-radius:99px; font-size:13px; pointer-events:none; }
.mapcard{ position:absolute; right:10px; bottom:10px; width:min(300px,calc(100% - 20px)); background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); padding:12px 14px; display:flex; flex-direction:column; gap:8px; z-index:3; }
.mapcard[hidden]{ display:none; }
.mc-top{ display:flex; justify-content:space-between; gap:8px; align-items:flex-start; } .mc-list{ display:flex; flex-direction:column; gap:6px; max-height:220px; overflow:auto; align-items:stretch; } .mc-list .btn{ text-align:left; white-space:normal; }
.mapbanner{ display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap; background:var(--warn-soft); border:1px solid var(--warn); border-radius:12px; padding:9px 13px; margin-top:8px; font-size:14px; }
.mapbanner[hidden]{ display:none; }
.mapsans{ margin-top:8px; }
.mapfilters select{ width:auto; max-width:220px; }
.mapempty{ position:absolute; inset:0; display:flex; flex-direction:column; gap:4px; align-items:center; justify-content:center; text-align:center; padding:20px; pointer-events:none; color:var(--ink); }
.mapempty strong{ background:var(--surface); padding:3px 12px; border-radius:99px; } .mapempty span{ background:var(--surface); padding:3px 12px; border-radius:10px; font-size:13px; color:var(--ink-muted); max-width:380px; }
@media (max-width:620px){ .map{ height:380px; } .maplegend2{ font-size:12px; } .mappills .pill{ padding:4px 10px; font-size:12px; } }
