﻿/* JM VRD Gestion — styles repris de la maquette validée (docs/maquette-web.html).
   Polices : Segoe UI Variable (Windows), pour fonctionner sans connexion internet. */
:root {
  /* style A1 Orange (validé le 21/11/2026, docs/maquette-style.html) */
  --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f2f4f7; --line: #e4e7ec; --line-2: #d0d5dd;
  --fg: #1d2433; --muted: #667085; --faint: #98a2b3;
  --accent: #e36c09; --accent-2: #fff1e6; --accent-fg: #ffffff; --asphalt: #2b3a52;
  --amber: #b8860b; --amber-2: #fdf3e1; --red: #c2372c; --red-2: #fcebe9; --green: #1d8150; --green-2: #e5f5ec; --blue: #2c6bc9; --blue-2: #e8f0fc;
  --shadow: 0 1px 2px rgba(16,27,34,.05), 0 6px 20px -12px rgba(16,27,34,.18);
  --f-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Cascadia Mono", Consolas, monospace;
  --r: 14px;
}
:root[data-theme="dark"] {
  --bg: #10151d; --panel: #171e29; --panel-2: #1e2733; --line: #283342; --line-2: #334154;
  --fg: #e9eef4; --muted: #9eabbb; --faint: #6f7d8f;
  --accent: #f59a2e; --accent-2: #3a2812; --accent-fg: #1a0f00; --asphalt: #8fa3c2;
  --amber: #f0b04f; --amber-2: #33270f; --red: #f2877d; --red-2: #3a1b19; --green: #6fd39e; --green-2: #14301f; --blue: #7fb0f5; --blue-2: #16263d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.5; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chargement { display: grid; place-items: center; height: 100vh; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: var(--red-2); color: var(--red); z-index: 100; }

.app { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; height: 100vh; }
/* aide intégrée (validé le 16/11/2026) : panneau à droite, l'écran reste utilisable */
.aide { width: 360px; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; height: 100vh; }
.aide-h { display: flex; align-items: flex-start; gap: 8px; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.aide-h small { color: var(--accent); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.aide-h h2 { font-size: 17px; margin-top: 2px; }
.aide-b { flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 13.5px; line-height: 1.5; }
.aide-b h3 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.aide-b ol, .aide-b ul { margin: 0; padding-left: 20px; }
.aide-b li { margin: 3px 0; }
.aide-b .inp { width: 100%; margin-top: 4px; }
.aide-liens { list-style: none; padding-left: 0 !important; }
.aide-liens a { color: var(--accent); text-decoration: none; }
.aide-liens a:hover { text-decoration: underline; }
.aide-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.ib.aide-bt { font-weight: 700; font-size: 16px; }
.ib.aide-bt.on { background: var(--accent-2); color: var(--accent); }
.sb { width: 248px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 3px; overflow-y: auto; transition: width .2s; }
.app.mini .sb { width: 72px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; }
.brand .lg { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.brand .lg img { width: 44px; }
.brand b { font-family: var(--f-head); font-size: 15px; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.sec { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); padding: 12px 10px 3px; white-space: nowrap; }
.nv { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.nv:hover { background: var(--panel-2); color: var(--fg); }
.nv.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.nv:focus-visible { outline: 2px solid var(--accent); }
.nv .bd { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; border-radius: 99px; padding: 0 7px; font-style: normal; }
.app.mini .nv span, .app.mini .nv .bd, .app.mini .brand div, .app.mini .sec, .app.mini .sync div { display: none; }
.sb .grow { flex: 1; }
.sync { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: center; font-size: 12.5px; margin-top: 8px; }
.sync .dt { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-2); flex: none; }
.sync.lk .dt { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-2); }
.sync small { color: var(--faint); display: block; }

.mn { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.hd { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ib { all: unset; cursor: pointer; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; position: relative; }
.ib:hover { background: var(--panel-2); color: var(--fg); }
.ib:focus-visible { outline: 2px solid var(--accent); }
.crumb { display: flex; gap: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.crumb b { color: var(--fg); }
.srch { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(360px, 40vw); padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--faint); font-size: 13.5px; }
.srch > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.srch kbd { white-space: nowrap; flex-shrink: 0; margin-left: auto; font-family: var(--f-mono); font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-2); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 11px; flex: none; }
.ct { flex: 1; overflow: auto; padding: 24px; }
.page { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ph h1 { font-size: 26px; font-weight: 700; }
.ph p { color: var(--muted); }
/* accueil : la situation du jour remplace « Bonjour » (17/11/2026), en plus petit */
.ph h1.h-situ { font-size: 19px; font-weight: 650; }
.ph h1.h-situ span { color: var(--muted); font-weight: 500; }
.ph .acts { margin-left: auto; display: flex; gap: 8px; }
.bt { border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.bt:hover { background: var(--panel-2); }
.bt.pr { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.bt:disabled { opacity: .5; cursor: default; }
.bt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.ch { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.ch h3 { font-size: 15px; }
.ch .sp { flex: 1; }
.kp { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.k { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.k .t { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.k .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.k .v { font-family: var(--f-head); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.k .v small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.k .s { font-size: 12.5px; color: var(--muted); }
.t-r { background: var(--red-2); color: var(--red); } .t-a { background: var(--amber-2); color: var(--amber); }
.t-g { background: var(--green-2); color: var(--green); } .t-t { background: var(--accent-2); color: var(--accent); } .t-b { background: var(--blue-2); color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.g2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
/* graphiques des tableaux de bord (18/11/2026) : petite courbe des cartes, courbe, anneau, classement */
.k .mini-courbe { align-self: flex-end; margin: -2px 0 -26px auto; display: block; opacity: .9; }
.g2.visuels { margin-bottom: 16px; }
.vis-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vis-col > .card { flex: 1; }
.cb-zone { display: grid; grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: 190px auto; column-gap: 8px; padding: 6px 18px 0 8px; }
.cb-axe { position: relative; }
.cb-axe span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; }
.cb-trace { position: relative; }
.cb-trace svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cb-grille { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cb-zero { stroke: var(--line-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cb-pt { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); opacity: 0; cursor: default; }
.cb-pt:hover, .cb-pt:last-of-type { opacity: 1; }
.cb-mois { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); padding-top: 6px; }
.cb-mois span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.cb-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); padding: 10px 18px 16px; }
.cb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cb-leg b { color: var(--fg); margin-left: 6px; font-weight: 600; }
.an-zone { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 4px 18px 18px; }
.an-zone svg { flex: none; }
.an-zone svg.an-lien { cursor: pointer; }
.an-tot { font-size: 5px; font-weight: 700; fill: var(--fg); font-family: var(--f-head); }
.an-u { font-size: 3px; fill: var(--muted); }
.an-leg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; flex: 1; }
.an-leg li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 40px; gap: 8px; align-items: center; }
.an-leg li i { width: 10px; height: 10px; border-radius: 50%; }
.an-leg li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-leg li small { color: var(--muted); text-align: right; }
.an-leg li.an-zero { color: var(--faint); }
.cl-zone { padding: 4px 18px 18px; }
.cl-l { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; margin: 9px 0; }
.cl-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-t { height: 10px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.cl-t i { display: block; height: 100%; border-radius: 6px; }
.todo { display: flex; flex-direction: column; padding: 8px 10px 12px; }
.td { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.td:hover { background: var(--panel-2); }
.td b { display: block; font-weight: 600; }
.td small { color: var(--muted); font-size: 12.5px; }
.vide { color: var(--muted); padding: 18px; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0; font-size: 13.5px; padding: 14px 18px 18px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.alerte { border-left: 4px solid var(--amber); background: var(--amber-2); padding: 10px 14px; border-radius: 8px; font-size: 13.5px; }
.lock { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.lock .card { max-width: 480px; padding: 30px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.lock .ico { width: 64px; height: 64px; border-radius: 18px; background: var(--amber-2); color: var(--amber); display: grid; place-items: center; }
.lock .ico svg { width: 30px; height: 30px; }
.lock dl { width: 100%; padding: 0; text-align: left; }
.lock .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.demo { font-size: 12px; color: var(--faint); }
.lock .premier { max-width: 560px; }
/* connexion, verrouillage et menu de l'utilisateur (validé le 16/11/2026) */
.verrou-ecran { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.verrou-ecran .card { max-width: 440px; padding: 30px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.verrou-ecran .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mu-ov { position: fixed; inset: 0; z-index: 60; }
.mu { position: fixed; top: 58px; right: 18px; z-index: 61; min-width: 270px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.mu-t { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mu-t small { color: var(--muted); font-size: 11.5px; }
.mu-i { display: block; width: 100%; text-align: left; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); cursor: pointer; font: inherit; font-size: 13px; }
.mu-i:hover { background: var(--panel-2); }
.logo-accueil { width: 120px; height: 110px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.logo-accueil img { width: 104px; }
.dossier { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.dossier small { color: var(--muted); font-size: 12px; font-weight: 600; }
.dossier code { font-family: var(--f-mono); font-size: 12px; background: var(--panel-2); padding: 9px 11px; border-radius: 9px; overflow-wrap: anywhere; }
.choix { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-top: 6px; border-top: 1px solid var(--line); width: 100%; }
.banniere { display: flex; align-items: center; gap: 12px; background: var(--accent-2); border: 1px solid var(--accent); color: var(--fg); padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.banniere span { flex: 1; }
/* ---- listes ---- */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.rw { cursor: pointer; } tr.rw:hover { background: var(--panel-2); } tr.rw.on { background: var(--accent-2); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.sub { display: block; color: var(--muted); font-size: 12px; }
.who { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.ini { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: none; background: var(--blue-2); color: var(--blue); }
.tbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button.on { background: var(--panel-2); color: var(--fg); font-weight: 600; }
.tabs button span { margin-left: 6px; font-size: 11.5px; color: var(--faint); }
.tabs button:focus-visible { outline: 2px solid var(--accent); }
.fin { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--faint); min-width: 200px; flex: 1; max-width: 320px; background: var(--bg); }
.fin input { all: unset; flex: 1; padding: 7px 0; color: var(--fg); font-size: 13.5px; }
.fin select { border: 0; background: transparent; color: var(--fg); font: inherit; }
.sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); }
.sum div { padding: 12px 16px; border-right: 1px solid var(--line); }
.sum div:last-child { border: 0; }
.sum small { color: var(--muted); font-size: 12px; display: block; }
.sum b { font-family: var(--f-head); font-size: 16px; font-variant-numeric: tabular-nums; }
.p-g { background: var(--green-2); color: var(--green); } .p-r { background: var(--red-2); color: var(--red); } .p-a { background: var(--amber-2); color: var(--amber); }
.p-b { background: var(--blue-2); color: var(--blue); } .p-n { background: var(--panel-2); color: var(--muted); } .p-t { background: var(--accent-2); color: var(--accent); }
.mbar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.prog { height: 7px; border-radius: 99px; background: var(--panel-2); overflow: hidden; flex: 1; }
.prog i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.prog i.ok { background: var(--green); }
.mbar span { font-size: 12px; color: var(--muted); width: 36px; text-align: right; }
.bt.sm { padding: 5px 10px; font-size: 12.5px; }
.bt.danger { color: var(--red); }
.lien { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.lien:hover { text-decoration: underline; }

/* ---- fiche latérale ---- */
.scrim { position: fixed; inset: 0; background: rgba(8,14,18,.35); z-index: 20; }
.drw { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgba(0,0,0,.35); z-index: 21; display: flex; flex-direction: column; animation: glisse .2s ease; }
@keyframes glisse { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.dh { display: flex; gap: 12px; align-items: flex-start; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dh h2 { font-size: 19px; }
.dh small { color: var(--muted); }
.db { flex: 1; overflow: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
/* le corps d'une fenêtre défile : ses blocs gardent leur hauteur (25/11/2026 : grille des droits d'un utilisateur et compteurs d'une fiche réduits à 0-2 px) */
.db > * { flex-shrink: 0; }
.df { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.amt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amt div { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; }
.amt small { color: var(--muted); font-size: 12px; }
.amt b { display: block; font-family: var(--f-head); font-size: 19px; font-variant-numeric: tabular-nums; }
.lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.drw dl.kv { padding: 0; }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.tl li { position: relative; display: flex; justify-content: space-between; gap: 10px; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.tl small { color: var(--muted); display: block; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- fenêtre de saisie ---- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8,14,18,.45); padding: 16px; }
.modal .bx { width: min(680px, 100%); max-height: calc(100vh - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; }
.modal .bx.etroit { width: min(480px, 100%); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.l2 { grid-column: span 2; }
.fld label { font-size: 12px; font-weight: 600; color: var(--muted); }
.fld label i { color: var(--red); font-style: normal; }
.inp { border: 1px solid var(--line-2); background: var(--panel); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13.5px; color: var(--fg); width: 100%; min-width: 0; }
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.inp:disabled { background: var(--panel-2); color: var(--muted); }
.inp.n { text-align: right; font-variant-numeric: tabular-nums; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
/* champ à choisir dans une liste ou à taper (unité des lignes) : la flèche de la liste est toujours visible, comme une liste déroulante modifiable */
.u-wrap { display: flex; align-items: stretch; gap: 0; }
.u-wrap .inp { min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.u-wrap .u-btn { all: unset; cursor: pointer; padding: 0 7px; display: flex; align-items: center; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-left: 0; border-radius: 0 7px 7px 0; background: var(--panel-2); }
.u-wrap .u-btn:hover:not(:disabled) { color: var(--accent); }
.u-wrap .u-btn:focus-visible { outline: 2px solid var(--accent); }
.mnu.mnu-unites { min-width: 90px; max-height: 280px; overflow-y: auto; }
.mnu.mnu-unites button { justify-content: flex-start; }
/* feuille de pointage : jour pointé sur un autre chantier que la feuille reprend (bord bleu pointillé) */
.fq-c.rep { border: 2px dashed var(--blue); background: var(--blue-2); }
/* grille des droits en lecture seule (rôle Administrateur, compte sans droit de modifier) : coche lisible au lieu d'une case grisée */
.droit-oui { color: var(--green); font-weight: 700; font-size: 15px; display: inline-block; width: 18px; text-align: center; }
.droit-non { color: var(--faint); display: inline-block; width: 18px; text-align: center; }
.erreurs { border-left: 4px solid var(--red); background: var(--red-2); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 13.5px; }
.erreurs ul { margin: 4px 0 0; padding-left: 18px; }
.calc { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.calc b { color: var(--fg); font-variant-numeric: tabular-nums; }

/* ---- document (bon de commande) ---- */
.back { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.back:hover { color: var(--accent); }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.steps span { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--faint); }
.steps span i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--panel-2); }
.steps span.ok { color: var(--fg); } .steps span.ok i { background: var(--green-2); color: var(--green); }
.steps span.cur { border-color: var(--accent); color: var(--accent); } .steps span.cur i { background: var(--accent); color: var(--accent-fg); }
.steps span.ann { border-color: var(--red); color: var(--red); }
table.lignes { min-width: 600px; }
table.lignes td.n { white-space: nowrap; }
td.mono { white-space: nowrap; }
table.lignes td { padding: 5px 6px; } table.lignes th { padding: 8px 6px; }
table.lignes .inp { padding: 6px 8px; }
table.lignes tr.titre .inp { font-weight: 700; }
table.lignes tr.rw.on td { background: var(--blue-2); }
table.lignes tr.alt td { background: var(--panel-2); }
table.lignes tr.st td { background: var(--accent-2); font-weight: 700; }
table.lignes tr.st td.lib { color: var(--accent); }
table.lignes .t-titre { color: var(--accent); font-weight: 700; text-transform: uppercase; }
table.lignes .t-suite { color: var(--muted); padding-left: 16px; }
/* ---- saisie du bon : un seul écran, les lignes prennent toute la hauteur ---- */
.bc-ecran { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 182px); min-height: 520px; }
.bc-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-tete h1 { font-size: 21px; font-weight: 700; }
.bc-tete h1 .mono { font-size: 15px; color: var(--muted); margin-left: 4px; }
.bc-champs { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bc-champs .fld label { font-size: 11.5px; }
.bc-champs .inp { padding: 6px 9px; }
.bc-tva { padding: 6px 10px; font-size: 13px; }
.bc-pied { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13.5px; }
.bc-pied span { color: var(--muted); }
.bc-pied b { color: var(--fg); font-variant-numeric: tabular-nums; margin-left: 6px; }
.bc-pied .ttc b { font-family: var(--f-head); font-size: 19px; }
.g-outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* grille de saisie des lignes */
.grille { flex: 1; min-height: 200px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.grille table.lignes { table-layout: fixed; min-width: 640px; }
.grille table.lignes td { padding: 3px 4px; border-bottom: 1px solid var(--line); background: var(--panel); }
.grille table.lignes .inp { border: 1px solid var(--line-2); background: var(--panel); padding: 6px 8px; border-radius: 7px; }
.grille table.lignes .inp:focus { border-color: var(--accent); outline: 2px solid var(--accent-2); outline-offset: 0; }
.grille table.lignes tr.g-l:focus-within td { background: var(--blue-2); }
.grille table.lignes .inp.manque { border-color: var(--red); background: var(--red-2); }
.grille .inp.g-titre { color: var(--accent); font-weight: 700; text-transform: uppercase; }
.grille .inp.g-suite { color: var(--muted); padding-left: 26px; }
/* texte des en-têtes et des totaux aligné sur celui des cases de saisie (4 px de cellule + 1 px de bordure + 8 px de marge = 13 px) */
.grille table.lignes thead th { position: sticky; top: 0; z-index: 3; background: var(--panel-2); box-shadow: 0 1px 0 var(--line); padding: 8px 13px; }
.grille table.lignes td.n { padding-right: 13px; }
.grille table.lignes td.lib { padding-left: 13px; }
.grille table.lignes tfoot td { position: sticky; bottom: 0; z-index: 3; background: var(--accent-2); box-shadow: 0 -1px 0 var(--line); padding: 6px 4px; border-bottom: 0; }
.grille table.lignes tfoot .inp { border-style: dashed; border-color: var(--accent); }
.grille table.lignes tr.st td { background: var(--accent-2); }
.grille td.g-m { position: relative; }
.mnu { position: absolute; right: 4px; top: 36px; z-index: 5; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.mnu.haut { top: auto; bottom: 36px; }
.mnu b { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; }
.mnu button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 7px; font-size: 13px; }
.mnu button:hover:not(:disabled) { background: var(--panel-2); }
.mnu button:disabled { opacity: .4; cursor: default; }
.mnu button.on { color: var(--accent); font-weight: 600; }
.mnu button.on::before { content: "✓ "; }
.mnu button.danger { color: var(--red); }
.mnu button:focus-visible { outline: 2px solid var(--accent); }
.mnu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.mnu-fond { position: fixed; inset: 0; z-index: 40; }
/* menu « Plus ▾ » des barres d'outils (MenuPlus.razor) */
.mplus { position: relative; display: inline-flex; }
.mnu.mplus-m { left: 0; right: auto; top: calc(100% + 4px); z-index: 41; min-width: 200px; }
.mnu.mplus-m > * { width: 100%; box-sizing: border-box; }
.mnu.mnu-clic { position: fixed; z-index: 41; right: auto; }
.mnu button { display: flex; gap: 16px; justify-content: space-between; }
.mnu kbd { font-family: var(--f-mono); font-size: 11px; color: var(--faint); }
.grille tr.g-menu td { background: var(--blue-2); }
.grille tbody tr { scroll-margin-top: 46px; scroll-margin-bottom: 56px; }
.saisie { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.saisie .fgrid { grid-template-columns: minmax(0, 3fr) 110px 100px 130px 170px; }
@media (max-width: 900px) { .saisie .fgrid { grid-template-columns: 1fr 1fr; } }
.hint { font-size: 11.5px; color: var(--faint); }
.hint.att { color: var(--amber); font-weight: 600; }
.err { border-left: 4px solid var(--red); background: var(--red-2); color: var(--red); padding: 9px 12px; border-radius: 7px; font-size: 13px; }
.info { border-left: 4px solid var(--green); background: var(--green-2); padding: 9px 12px; border-radius: 7px; font-size: 13px; }
ul.points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
/* ---- onglets du module (écrans) ---- */
nav.onglets { flex-direction: row; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
nav.onglets a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
nav.onglets a:hover { background: var(--panel-2); color: var(--fg); }
nav.onglets a.on { background: var(--accent-2); color: var(--accent); font-weight: 600; }
nav.onglets a:focus-visible { outline: 2px solid var(--accent); }
.nv.active .i { color: var(--accent); }
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.etape { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.etape .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-weight: 700; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 14px 18px 16px; align-items: end; }
.bars.douze { grid-template-columns: repeat(12, 1fr); gap: 6px; }
.kp.six { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.bars > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.bars .col { display: flex; gap: 3px; align-items: flex-end; width: 100%; height: 140px; }
.bars .col i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opts label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.opts label.on { border-color: var(--accent); background: var(--accent-2); }
.tot { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.tot div { display: flex; justify-content: space-between; gap: 10px; }
.tot div span { color: var(--muted); }
.tot .big { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.tot .big b { font-family: var(--f-head); font-size: 22px; }
.mini { list-style: none; margin: 0; padding: 6px 18px 14px; display: flex; flex-direction: column; }
.mini li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.mini li:last-child { border: 0; }
.mini small { color: var(--muted); display: block; }

/* ---- fournisseurs ---- */
.cnt { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cnt div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.cnt b { font-family: var(--f-head); font-size: 22px; }
.cnt small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.tg { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tc { padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tc:hover { border-color: var(--accent); }
.tc:focus-visible { outline: 2px solid var(--accent); }
.tc header { display: flex; gap: 12px; align-items: center; }
.tc header div { flex: 1; min-width: 0; }
.tc header b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc header small { color: var(--muted); font-size: 12.5px; }
.tc .m { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12.5px; }
.tc .m small { color: var(--muted); display: block; }
.tc .m b { font-variant-numeric: tabular-nums; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--fg); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-weight: 500; z-index: 40; font-size: 13.5px; box-shadow: var(--shadow); animation: monte .2s ease; }
@keyframes monte { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

@media (max-width: 1100px) { .g2, .doc { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.td.lien-td { cursor: pointer; border-radius: 8px; }
.td.lien-td:hover, .td.lien-td:focus { background: var(--ground, rgba(0,0,0,.04)); outline: none; }

/* Calendrier des échéances */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.cal-e { background: var(--panel-2); padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-j { background: var(--panel, #fff); min-height: 96px; padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-j.hors { opacity: .45; }
.cal-j.auj .cal-n { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal-n { font-size: 12px; font-weight: 600; align-self: flex-start; }
.cal-ev { all: unset; cursor: pointer; font-size: 11.5px; padding: 2px 5px; border-left: 3px solid var(--muted); background: var(--panel-2); border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover, .cal-ev:focus-visible { outline: 1px solid var(--accent); }
.cal-plus { all: unset; cursor: pointer; font-size: 11px; color: var(--accent); }
/* Arrivée depuis la recherche : la ligne trouvée clignote */
@keyframes clignote { 0%, 50%, 100% { background: transparent; } 25%, 75% { background: color-mix(in srgb, var(--accent) 28%, transparent); } }
tr.clignote td { animation: clignote 1.1s ease-in-out 3; }
/* Onglets (Paramètres, Charges, recherche) : lisibles sur le fond de la page, onglet choisi bien marqué */
.tabs { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; width: fit-content; max-width: 100%; }
.tabs button { color: var(--fg); }
.tabs button:hover { background: var(--panel-2); }
.tabs button.on { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.tabs button.on span { color: var(--accent-fg); opacity: .85; }
/* ---- planning des congés (grille du mois) ---- */
table.planning { font-size: 12px; }
table.planning th, table.planning td { padding: 5px 6px; }
table.planning th { text-align: center; }
table.planning td.cel { text-align: center; min-width: 24px; padding: 4px 2px; cursor: pointer; font-weight: 600; font-size: 11px; border-left: 1px solid var(--line); }
table.planning td.cel:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
table.planning .dim { background: var(--panel-2); }
table.planning .fer { background: rgba(245, 158, 11, .15); }
table.planning th.auj { background: var(--accent); color: var(--accent-fg); border-radius: 4px; }
table.planning td.auj { box-shadow: inset 0 0 0 1px var(--accent); }
table.planning td.dem { font-style: italic; font-weight: 500; color: var(--muted); }
table.planning tr.absents td { background: var(--panel-2); font-size: 11px; }
/* ---- pointage (grille du mois) ---- */
/* Grille sans défilement horizontal (validé le 16/11/2026) : les 31 jours se partagent la largeur de la fenêtre ; défilement vertical seulement */
.pt-grille { outline: none; max-height: calc(100vh - 360px); overflow-x: hidden; overflow-y: auto; }
.pt-grille:focus { box-shadow: inset 0 0 0 2px var(--accent); }
table.pointage { font-size: 12px; border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
table.pointage th, table.pointage td { padding: 2px 2px; overflow: hidden; }
table.pointage thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); text-align: center; font-weight: 500; }
table.pointage thead th.pt-hj { cursor: pointer; line-height: 1.15; }
table.pointage thead th.pt-hj:hover { background: var(--panel-2); }
table.pointage thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
table.pointage col.pt-cn { width: 190px; }
table.pointage col.pt-ct { width: 62px; }
table.pointage col.pt-cnet { width: 88px; }
table.pointage td.n, table.pointage th.n { padding: 2px 5px; }
table.pointage input.pt-hs { width: 100%; box-sizing: border-box; padding: 2px 3px; }
table.pointage tbody tr:hover td.pt-nom { background: var(--panel-2); }
table.pointage tbody tr:hover td.pt-c { filter: brightness(.96); }
@media (max-width: 1500px) { table.pointage col.pt-cn { width: 150px; } table.pointage col.pt-ct { width: 50px; } table.pointage col.pt-cnet { width: 74px; } table.pointage { font-size: 11px; } }
table.pointage .pt-nom { position: sticky; left: 0; z-index: 1; background: var(--panel); padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
table.pointage thead .pt-nom { z-index: 3; }
table.pointage td.pt-c { text-align: center; height: 32px; cursor: cell; font-weight: 600; font-size: 12px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); user-select: none; }
table.pointage td.pt-c.fut { opacity: .6; }
table.pointage td.pt-c.hors { background: repeating-linear-gradient(135deg, var(--panel-2) 0 4px, var(--line) 4px 5px); color: var(--muted); cursor: not-allowed; }
table.fp input.fp-c { width: 64px; text-align: center; padding: 4px 2px; text-transform: uppercase; }
table.fp input.fp-h { width: 70px; padding: 4px 4px; }
table.fp input.chg { border-color: #F59E0B; box-shadow: inset 0 0 0 1px #F59E0B; }
table.fp input.bad { border-color: #DC2626; box-shadow: inset 0 0 0 1px #DC2626; }
table.fp input.amb { border: 2px dashed #DC2626; }
.fp-grille.avec { display: grid; grid-template-columns: minmax(0, 1fr) 36%; gap: 10px; align-items: start; }
.fp-grille.avec table.fp input.fp-c { width: 52px; }
.fp-grille.avec table.fp input.fp-h { width: 56px; }
@media (max-width: 1450px) { .fp-grille.avec { grid-template-columns: minmax(0, 1fr); } .fp-photo { position: static; } .fp-img { max-height: 70vh; } }
.fp-photo { position: sticky; top: 8px; padding: 0; }
.fp-img { max-height: calc(100vh - 260px); overflow: auto; background: var(--panel-2); }
.fp-img img { display: block; width: 100%; }
.fp-img img.zoom { width: 220%; max-width: none; }
table.fp tr.fp-gas td { background: var(--panel-2); }
/* feuille de quinzaine : 15 ou 16 jours sur une ligne */
table.fq th.n, table.fq td.n { padding-left: 2px; padding-right: 2px; text-align: center; }
table.fq th.fq-fin { white-space: normal; line-height: 1.15; max-width: 72px; }
table.fq th.dim { color: var(--red); }
table.fq input.fq-c { width: 38px; text-align: center; padding: 4px 1px; text-transform: uppercase; }
table.fq input.fq-m { width: 60px; padding: 4px 4px; text-align: right; }
table.fq td.n > input { margin: 0 auto; display: block; }
table.fq input.chg { border-color: #F59E0B; box-shadow: inset 0 0 0 1px #F59E0B; }
table.fq input.bad { border-color: #DC2626; box-shadow: inset 0 0 0 1px #DC2626; }
table.fq tr.fq-grp td { background: var(--panel-2); padding: 5px 8px; letter-spacing: .04em; }
table.fq tr.fq-hs td { background: var(--panel-2); padding-top: 2px; padding-bottom: 2px; }
table.fq tr.verrou td { opacity: .7; }
/* panneau latéral de détails (double-clic sur une ligne) */
dl.dtl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 4px 12px; margin: 6px 0 0; }
dl.dtl dt { color: var(--muted); font-size: 12.5px; }
dl.dtl dd { margin: 0; font-size: 13.5px; word-break: break-word; }
dl.dtl dd.t-r { color: var(--red); font-weight: 600; } dl.dtl dd.t-a { color: var(--accent); font-weight: 600; } dl.dtl dd.t-v { color: var(--green); }
/* bon de livraison détaillé : quantités par ligne */
table.bl input.bl-q { width: 90px; text-align: right; padding: 4px 6px; }
table.bl input.bad { border-color: #DC2626; box-shadow: inset 0 0 0 1px #DC2626; }
table.bl tr.solde td { opacity: .55; }
table.fq input.amb { border: 2px dashed #DC2626; }
table.fq img.fq-v { display: block; width: 100%; max-width: 62px; height: 16px; object-fit: contain; margin: 2px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.fp-grille.avec table.fq input.fq-c { width: 32px; }
table.fp tr.verrou td { opacity: .7; }
.pt-statuts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pt-st { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); cursor: pointer; font: inherit; font-size: 13px; }
.pt-st:hover { background: var(--panel-2); }
.pt-st.on { border: 2px solid var(--accent); padding: 0 9px; }
.pt-sw { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 4px; font-size: 11px; font-weight: 600; flex: none; }
.pt-leg { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 8px 12px; font-size: 12px; color: var(--muted); }
.pt-leg > span { display: inline-flex; gap: 5px; align-items: center; }
.pt-ov { position: fixed; inset: 0; z-index: 90; }
.pt-menu { position: fixed; z-index: 91; min-width: 230px; max-height: calc(100vh - 20px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.pt-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pt-mt { font-size: 11px; color: var(--muted); padding: 3px 8px; }
.pt-mi { display: flex; width: 100%; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.pt-mi:hover { background: var(--panel-2); }
table.pointage td.pt-c.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
table.pointage td.pt-c.bloq { box-shadow: inset 0 0 0 2px #DC2626; }
table.pointage td.pt-c.averif { box-shadow: inset 0 0 0 2px #F59E0B; }
table.pointage .dim { background: var(--panel-2); }
table.pointage .fer { background: rgba(245, 158, 11, .15); }
table.pointage th.auj { background: var(--accent); color: var(--accent-fg); }
table.pointage tr.verrou td.pt-c { opacity: .75; cursor: not-allowed; }
/* ligne gasoil lisible : litres en gras, cadre net, sans les flèches du champ numérique qui mangeaient la largeur des cases étroites */
table.pointage tr.pt-gas td { padding: 3px 1px; background: var(--panel-2); }
table.pointage tr.pt-gas td.pt-nom { font-size: 11px; }
table.pointage input.pt-g { width: 100%; height: 26px; box-sizing: border-box; border: 1px solid #94A3B8; border-radius: 4px; font: 600 12px/1 inherit; text-align: center; padding: 0; background: #fff; color: #0f172a; -moz-appearance: textfield; appearance: textfield; }
table.pointage input.pt-g::-webkit-inner-spin-button, table.pointage input.pt-g::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* petit code numérique dans un tableau (rubriques de paie…) : jamais coupé, sans les flèches qui prennent la place des chiffres (23/11/2026) */
input.inp.code { min-width: 4.8em; text-align: center; -moz-appearance: textfield; appearance: textfield; }
input.inp.code::-webkit-inner-spin-button, input.inp.code::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
table.pointage input.pt-g:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
table.pointage input.pt-g:disabled { background: transparent; color: var(--fg); opacity: .8; }
.pl-l { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px; text-align: center; font-weight: 700; font-style: normal; color: #0f172a; }
/* Planning des chantiers (Gantt, validé le 16/11/2026) */
.gantt-sc { overflow-x: auto; padding: 0; }
.gantt { position: relative; min-width: max-content; font-size: 12.5px; }
div.g-l { display: flex; border-bottom: 1px solid var(--line); min-height: 34px; }
.g-nom { position: sticky; left: 0; z-index: 3; width: 280px; min-width: 280px; padding: 6px 10px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 1px; overflow: hidden; }
.g-p .g-nom { cursor: pointer; }
.g-p .g-nom:hover b { color: var(--accent); }
.g-p.voir .g-nom { box-shadow: inset 3px 0 0 var(--accent); }
.g-e .g-nom { padding: 3px 10px 3px 26px; cursor: pointer; color: var(--muted); white-space: nowrap; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.g-e .g-nom .sub { display: inline; margin: 0; }
.g-e { min-height: 26px; }
.g-i { min-height: 16px; }
.g-i .g-nom { padding-left: 26px; }
.g-grp .g-nom { font-weight: 700; background: var(--panel-2); }
.g-grp { background: var(--panel-2); min-height: 28px; }
.g-tete { position: sticky; top: 0; z-index: 4; background: var(--panel-2); min-height: 28px; font-weight: 600; }
.g-tete .g-nom { background: var(--panel-2); }
.g-piste { position: relative; flex: none; }
.g-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); font-size: 10.5px; color: var(--muted); padding: 7px 2px 0; text-align: center; overflow: hidden; white-space: nowrap; }
.g-col.auj { background: var(--amber-2); color: var(--fg); }
.g-auj { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--amber); opacity: .6; z-index: 1; }
.g-b { position: absolute; top: 7px; height: 20px; border-radius: 5px; background: var(--accent); color: #fff; overflow: hidden; cursor: grab; z-index: 2; user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.g-b.termine { background: var(--green); } .g-b.suspendu { background: #94A3B8; } .g-b.retard { background: var(--red); }
.g-b.g-et { top: 5px; height: 16px; background: #fdba74; color: #4a2a05; }
.g-b.g-et.retard { background: #fca5a5; color: #5b0f0f; }
.g-b.g-glisse { opacity: .75; cursor: grabbing; outline: 2px solid var(--asphalt); }
.g-av { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0,0,0,.18); pointer-events: none; }
.g-b .g-t { position: relative; padding: 0 8px; line-height: 20px; font-size: 11.5px; white-space: nowrap; pointer-events: none; }
.g-b.g-et .g-t { line-height: 16px; font-size: 11px; }
.g-hd, .g-hf { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 3; }
.g-hd { left: 0; } .g-hf { right: 0; }
.g-hd:hover, .g-hf:hover { background: rgba(255,255,255,.35); }
.g-ref { position: absolute; top: 29px; height: 3px; background: var(--faint); border-radius: 2px; z-index: 1; }
.g-e .g-ref { top: 22px; }
.g-jal { position: absolute; top: 6px; transform: translateX(-50%); font-size: 15px; color: var(--asphalt); z-index: 3; cursor: default; }
.g-jal.fait { color: var(--green); } .g-jal.retard { color: var(--red); }
.g-ind { position: absolute; top: 4px; height: 8px; border-radius: 2px; opacity: .85; }
.g-ind.conge { background: repeating-linear-gradient(45deg, var(--blue) 0 3px, transparent 3px 6px); }
.g-ind.panne { background: repeating-linear-gradient(45deg, var(--red) 0 3px, transparent 3px 6px); }
.g-ind.pl-engin { background: #9aa3ae; height: 10px; }
.g-ind.pl-engin.ouverte { border-right: 3px dashed var(--fg); }
.g-vide { position: absolute; top: 9px; left: 8px; color: var(--faint); font-style: italic; white-space: nowrap; }
.g-conf { color: var(--red); font-size: 11.5px; font-weight: 600; }
.g-leg { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.g-leg i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; }
.g-leg .g-leg-c { background: repeating-linear-gradient(45deg, var(--blue) 0 3px, transparent 3px 6px); }
.g-leg .g-leg-p { background: repeating-linear-gradient(45deg, var(--red) 0 3px, transparent 3px 6px); }

/* ---- Planning « comme un Gantt » (23/11/2026, maquette docs/maquette-planning-gantt.html) : tableau de saisie à gauche, barres plus grandes ---- */
.pl-page { max-width: none; }
.pl-barre { padding: 10px 14px; margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pl-zoom { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.pl-zoom button { border: 0; background: var(--panel); padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.pl-zoom button.on { background: var(--asphalt); color: #fff; }
.pl-per { font-size: 13px; margin: 0 4px; white-space: nowrap; }
.pl-sc { overflow: auto; max-height: calc(100vh - 250px); min-height: 360px; }
.gantt .g-tab { position: sticky; left: 0; z-index: 3; width: 780px; min-width: 780px; display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 118px 110px 110px 38px 44px 42px 78px; align-items: center; gap: 0 4px;
  padding: 0 6px; background: var(--panel); border-right: 2px solid var(--line); font-size: 12.5px; overflow: hidden; }
.gantt .g-tab > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt .g-tab .n { text-align: right; }
.gantt .g-tab .pl-span, .gantt .pl-nomc { grid-column: span 2; }
.gantt .g-tete .g-tab.pl-t { background: var(--panel-2); font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gantt .g-tete { min-height: 34px; }
.gantt .g-grp .g-tab { background: var(--panel-2); font-weight: 700; }
.gantt .g-p .g-tab { background: #fafafa; font-weight: 600; }
.gantt .pl-nomc { cursor: pointer; } .gantt .pl-nomc:hover b { color: var(--accent); }
.gantt .pl-pli { cursor: pointer; color: var(--muted); text-align: center; }
.gantt .c-n { color: var(--muted); text-align: right; font-size: 11.5px; }
.gantt input.c-in, .gantt select.c-in { width: 100%; height: 28px; border: 1px solid transparent; border-radius: 5px; background: transparent; font: inherit; font-size: 12.5px; padding: 0 5px; color: var(--ink); }
.gantt input.c-in.n { text-align: right; }
.gantt .g-e:hover input.c-in, .gantt .g-e:hover select.c-in, .gantt .g-e.pl-sel input.c-in, .gantt .g-e.pl-sel select.c-in, .gantt input.c-in:focus, .gantt select.c-in:focus { border-color: var(--line); background: #fff; }
.gantt .pl-nouv input.c-in { border: 1px dashed var(--line); }
.gantt .pl-nouv .g-tab { grid-template-columns: 28px minmax(0, 1fr) auto; }
.gantt .pl-nouv .g-tab .pl-span { grid-column: auto; }
.gantt .pl-nouv .g-tab .bt { white-space: nowrap; overflow: visible; }
.gantt .pl-eq { display: flex; gap: 3px; }
.gantt .pl-eq i { font-style: normal; font-size: 11px; background: #eef2ff; color: #3730a3; border-radius: 10px; padding: 0 6px; }
div.g-l.g-e { min-height: 36px; cursor: default; }
div.g-l.g-e.pl-sel .g-tab, div.g-l.g-e.pl-sel { background: var(--accent-2, #fff3e6); }
div.g-l.g-p { min-height: 34px; }
.gantt .g-b.g-et { top: 7px; height: 22px; background: #93c5fd; color: #fff; border-radius: 5px; }
.gantt .g-b.g-et .g-av { background: #2563eb; }
.gantt .g-b.g-et.termine { background: #86efac; } .gantt .g-b.g-et.termine .g-av { background: #16a34a; }
.gantt .g-b.g-et.retard { background: #fca5a5; color: #fff; } .gantt .g-b.g-et.retard .g-av { background: #dc2626; }
.gantt .g-b.g-et .g-t { line-height: 22px; font-size: 11.5px; font-weight: 600; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.gantt .g-b.pl-resume { top: 12px; height: 10px; border-radius: 2px; background: var(--asphalt); }
.gantt .g-b.pl-resume .g-av { background: rgba(255,255,255,.35); }
.gantt .g-b.pl-resume.retard { background: var(--red); }
.gantt .g-lien { position: absolute; right: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #fff; border: 2px solid #475569; cursor: crosshair; z-index: 4; opacity: .45; }
.gantt .g-b.g-et:hover .g-lien { opacity: 1; }
.gantt .g-hf { right: 10px; }
.gantt .g-col.we { background: #f6f7f9; }
svg.g-liens { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
svg.g-liens path { fill: none; stroke: #475569; stroke-width: 1.4; }
svg.g-liens line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 3; }
.pl-bas { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.pl-bas section { padding: 12px 14px; }
.pl-bas section + section { border-left: 1px solid var(--line); }
.pl-bas h3 { margin: 0 0 8px; font-size: 14px; }
.pl-puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-puces span { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.pl-puces span.e { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.pl-puces span button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: 11px; padding: 0 4px; }
.pl-ajout { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.pl-ajout select.inp { max-width: 340px; }

/* « Vérifier tous les écrans » (18/11/2026) : barre d'avancement en bas à droite, au-dessus de tout */
.verif-barre { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 380px; background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.verif-barre b { display: block; font-size: 13.5px; }
.verif-barre small { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.verif-barre .bt { align-self: flex-end; }
.verif-prog { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.verif-prog span { display: block; height: 100%; background: var(--accent); transition: width .2s; }

/* Contrat de chantier en arabe (20/11/2026) : champs à gauche, aperçu du contrat (de droite à gauche) à droite */
.modal .bx:has(.cc-corps) { width: min(1140px, 100%); }
/* bordereau CNSS : fenêtre large pour le tableau des employés déclarés (20/11/2026) */
.modal .bx:has(.cnss-decl) { width: min(1120px, 100%); }
.cnss-decl td.cnss-nom { white-space: nowrap; }
.cc-corps { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
.cc-champs .fld { margin-bottom: 8px; }
.cc-champs .hint { display: block; }
.cc-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-ar { font-family: "Traditional Arabic", "Simplified Arabic", Arial, sans-serif; font-size: 17px; }
.cc-apercu { background: var(--panel-2); border-radius: 10px; padding: 12px; }
.cc-feuille { background: #fff; color: #111; padding: 22px 28px; box-shadow: 0 1px 6px rgba(0,0,0,.15); font-family: Arial, "Traditional Arabic", sans-serif;
  font-size: 13px; line-height: 1.55; max-height: 62vh; overflow: auto; text-align: right; }
.cc-feuille p { margin: 0; white-space: pre-wrap; }
.cc-feuille .cc-titre { text-align: center; font-size: 17px; }
.cc-feuille .cc-gras { font-weight: 700; }
.cc-feuille .cc-soul { text-decoration: underline; }
.cc-feuille .cc-vide { height: 10px; }
.cc-resil { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--panel-2); }
.cc-rempli { background: #fff3b0; border-radius: 2px; padding: 0 2px; }

/* ===== Devis clients (20/11/2026) : grille type Excel + récapitulatif à droite ===== */
.dv-ecran { max-width: 1480px; }
.dv-grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; flex: 1; min-height: 0; }
.dv-gauche { display: flex; flex-direction: column; min-height: 0; }
/* tous les boutons sur une ligne, même hauteur (demande du 21/11/2026 : « tout aligner même les boutons ») */
.dv-outils { gap: 6px; padding: 8px 10px; flex-wrap: nowrap; overflow-x: auto; align-items: center; }
.dv-outils .bt { white-space: nowrap; flex: none; }
.dv-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.dv-actions .bt { justify-content: center; text-align: center; white-space: nowrap; }
table.dv-t tr.dv-fin td { background: var(--panel); }
.dv-finl { color: var(--muted); font-size: 12px; font-style: italic; border-top: 2px solid var(--line-2); padding: 3px 8px !important; }
.dv-l.dv-hors span:first-child { font-style: italic; }
.dv-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.dv-tw { flex: 1; min-height: 0; overflow: auto; }
table.dv-t { width: 100%; border-collapse: collapse; }
table.dv-t th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); }
table.dv-t td { padding: 1px 4px; vertical-align: middle; }
table.dv-t td.dv-ck, table.dv-t th.dv-ck { width: 28px; text-align: center; }
table.dv-t tr.on td { background: var(--accent-2, var(--panel-2)); }
table.dv-t tr.dv-lot td { background: var(--panel-2); font-weight: 700; }
table.dv-t tr.dv-txt td { color: var(--muted); font-style: italic; }
table.dv-t tr.dv-fact td { color: var(--muted); }
/* cases toujours visibles (on voit où taper), discrètes en lecture seule */
.dv-in { border: 1px solid var(--line-2); background: var(--panel); padding: 4px 6px; border-radius: 6px; }
.dv-in:hover:not(:disabled) { border-color: var(--accent); }
.dv-in:disabled { border-color: transparent; background: transparent; color: var(--fg); }
.dv-in::placeholder { color: var(--faint); font-weight: 400; text-transform: none; }
table.dv-t td { padding: 3px 4px; }
.dv-rem > span:first-child { display: flex; align-items: center; gap: 4px; }
.dv-rem .inp { width: 62px; padding: 2px 5px; font-size: 12.5px; }
.dv-rem select.inp { width: 56px; }
.dv-biblio .dv-arts { display: flex; flex-direction: column; margin-top: 6px; max-height: 260px; overflow: auto; }
.dv-art { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.dv-art:hover { background: var(--panel-2); }
.dv-art small { color: var(--muted); }
.dv-x { font-size: 11px; opacity: .6; }
tr.dv-tot td { font-weight: 700; border-top: 1px solid var(--line); }
.dv-lotin { font-weight: 700; text-transform: uppercase; }
.dv-droite { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.dv-recap { padding: 12px 14px; }
.dv-recap h3 { margin: 0 0 8px; font-size: 14px; }
.dv-l { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.dv-l.t { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 700; }
.dv-l.ttc { font-size: 15px; }
.dv-suivi { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; overflow: auto; flex: 1; min-height: 0; align-content: start; }
.dv-chron { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.dvc { display: flex; flex-direction: column; gap: 10px; min-width: min(980px, 82vw); }
.dvc-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dvc-t .inp.sm { padding: 3px 6px; font-size: 12.5px; }
.dvc-t tr.dvc-lot td { background: var(--panel-2); font-weight: 700; }
.dvc-t tr.dvc-ign td { opacity: .5; }
.modal .bx:has(.dvc) { width: min(1200px, 100%); }
@media (max-width: 1100px) { .dv-grille { grid-template-columns: 1fr; } }

/* ===================================================================================================
   NOUVEAU STYLE A1 ORANGE (validé le 21/11/2026, docs/maquette-style.html) : menu dépliant repliable, barre du haut
   (+ Nouveau, cloche « À traiter »), saisie dans un panneau à droite, listes aérées, taille adaptée à l'écran.
   =================================================================================================== */
/* ---- menu dépliant ---- */
.sb { gap: 2px; }
.nv.mod { width: 100%; box-sizing: border-box; }
.nv .fl { margin-left: auto; font-style: normal; font-size: 15px; color: var(--faint); transition: transform .15s; }
.nv.mod.ouvert .fl { transform: rotate(90deg); }
.sm-l { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px 40px; }
.sm-l a { padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-l a:hover { background: var(--panel-2); color: var(--fg); }
.sm-l a.on { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.sm-l a:focus-visible { outline: 2px solid var(--accent); }
.nv.mod.active:not(.ouvert) { background: var(--accent-2); color: var(--accent); }
.nv.mod.active.ouvert { background: transparent; color: var(--fg); font-weight: 600; }
/* « Replier le menu » et repli automatique pendant une saisie supprimés le 21/11/2026 : menu toujours déplié */
/* ---- barre du haut : + Nouveau, cloche ---- */
.hd { background: var(--panel); padding: 9px 22px; }
.nvx { position: relative; display: inline-flex; }
.nvx .mu { position: absolute; top: calc(100% + 6px); right: 0; }
.nvx-m { min-width: 240px; max-height: calc(100vh - 90px); overflow-y: auto; }
.mu-g { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 2px; }
/* « + Nouveau » (21/11/2026) : titre de module grisé, non cliquable, trait au-dessus ; ses boutons en retrait */
.nvx-m .mu-g { font-weight: 700; padding: 10px 12px 4px; margin-top: 4px; border-top: 1px solid var(--line); pointer-events: none; user-select: none; }
.nvx-m .mu-g:first-child { border-top: 0; margin-top: 0; }
.nvx-m .mu-i { padding-left: 26px; }
.nvx-m .mu-plus { display: inline-block; width: 14px; margin-left: -16px; color: var(--accent); font-weight: 700; }
.ib.cloche { font-size: 17px; border: 1px solid var(--line); }
.cl-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cl-n.r { background: var(--red); }
.cl-m { width: 380px; max-height: calc(100vh - 90px); overflow-y: auto; }
.mu-i.cl-i { display: flex; gap: 10px; align-items: flex-start; height: auto; padding: 8px 10px; }
.mu-i.cl-i small { display: block; color: var(--muted); font-size: 12px; }
.mu-i.cl-i b { font-weight: 600; }
.cl-pt { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--amber); }
.cl-pt.t-r { background: var(--red); } .cl-pt.t-g { background: var(--green); } .cl-pt.t-b { background: var(--blue); } .cl-pt.t-t { background: var(--accent); }
/* ---- saisie dans un panneau à droite (toutes les fenêtres de saisie) ---- */
.modal.tiroir { place-items: stretch end; padding: 0; background: rgba(16, 24, 40, .16); }
.modal.tiroir .bx { width: clamp(520px, 44vw, 760px); max-width: 100vw; height: 100vh; max-height: none; border-radius: 0; border: 0; border-left: 1px solid var(--line); box-shadow: -18px 0 44px -20px rgba(16, 24, 40, .4); animation: glisse .18s ease; }
.modal.tiroir .bx.etroit { width: clamp(420px, 32vw, 520px); }
.modal.tiroir .bx:has(.dvc), .modal.tiroir .bx:has(.bp-ecran), .modal.tiroir .bx:has(.cnss-decl), .modal.tiroir .bx:has(.cc-corps), .modal.tiroir .bx:has(table.lignes) { width: min(1200px, 94vw); }
.modal.tiroir .dh { padding: 16px 20px; }
.modal.tiroir .db { padding: 16px 20px; }
.modal.tiroir .df { padding: 10px 20px 12px; background: var(--panel-2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
/* raccourcis sur leur propre ligne, boutons sur une ligne à droite, le bouton principal (Ajouter, Enregistrer…) en dernier */
.df-k { order: -1; flex-basis: 100%; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal.tiroir .df > .bt.pr { order: 10; }
.df-k kbd { font-family: var(--f-body); font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel); color: var(--muted); }
.et-nouveau { display: none; }
body.peut-nouveau .modal.tiroir .et-nouveau { display: inline-flex; }
/* la liste reste visible à gauche du panneau (grand écran) */
@media (min-width: 1300px) { .app:has(.modal.tiroir) .ct { padding-right: calc(clamp(520px, 44vw, 760px) + 16px); } }
/* liste à côté du panneau : une ligne par élément (défilement horizontal plutôt que des noms coupés sur plusieurs lignes) */
.app:has(.modal.tiroir) .ct .tw td { white-space: nowrap; }
.app:has(.modal.tiroir) .ct .tw td .sub { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
/* erreurs reportées sous le champ concerné */
.fld.err-champ .inp, .fld.err-champ select { border-color: var(--red); background: var(--red-2); }
.fld-msg { color: var(--red); font-size: 12px; font-weight: 600; }
/* ---- listes aérées ---- */
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; background: var(--panel-2); }
td { padding: 12px 14px; }
tbody tr.rw:nth-child(even) td { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
tr.rw:hover { background: transparent; }
tr.rw:hover td { background: var(--accent-2); }
tr.rw.on td { background: var(--accent-2); }
tr.rw.on td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sum { background: var(--panel-2); border-radius: 0 0 var(--r) var(--r); }
/* actions sur la ligne survolée (Ouvrir · PDF · Payer…) */
.l-act { opacity: 0; transition: opacity .1s; justify-content: flex-end; }
tr.rw:hover .l-act, tr.rw.on .l-act, tr.rw:focus-within .l-act { opacity: 1; }
.l-act .bt { padding: 3px 9px; font-size: 12px; }
th.l-act-h { width: 1%; }
/* ---- accueil : actions rapides ---- */
.rapides { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.rapide { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.rapide:hover { border-color: var(--accent); }
.rapide:focus-visible { outline: 2px solid var(--accent); }
.rapide i { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 18px; flex: none; }
.rapide b { display: block; }
.rapide small { display: block; color: var(--muted); font-size: 12px; }
/* ---- taille adaptée à l'écran : compacte sur portable, plus grande sur grand écran ---- */
/* 21/11/2026 (capture du bon de commande : « trop petite la zone ») : les écrans prennent toute la largeur,
   les écrans de saisie de documents (bon de commande, facture, proforma, devis) toute la largeur et toute la hauteur */
.page { max-width: none; }
.bc-ecran, .dv-ecran { max-width: none; height: calc(100vh - 112px); }
@media (min-width: 1800px) {
  body { font-size: 15px; } table { font-size: 14.5px; } .inp, .bt { font-size: 14.5px; } .sm-l a { font-size: 14px; }
  td { padding: 13px 16px; } th { padding: 11px 16px; } .ph h1 { font-size: 28px; }
}
@media (max-width: 1500px) {
  body { font-size: 13.5px; } table { font-size: 13px; } .inp { font-size: 13px; } .bt { font-size: 13px; }
  td { padding: 9px 12px; } th { padding: 8px 12px; } .ct { padding: 16px 18px; } .hd { padding: 8px 16px; }
  .sb { width: 228px; } .ph h1 { font-size: 23px; }
  .bc-ecran, .dv-ecran { height: calc(100vh - 96px); }
}

/* ---- situations de travaux (24/11/2026) : % cumulés à gauche, décompte à droite ---- */
.sit-lbl { font-size: 12px; color: var(--muted); }
.sit-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; margin-top: 10px; }
@media (max-width: 1300px) { .sit-grille { grid-template-columns: 1fr; } }
table.sit-t { width: 100%; border-collapse: collapse; }
table.sit-t td { padding: 3px 6px; vertical-align: middle; }
table.sit-t tr.sit-lot td { background: var(--panel-2); font-weight: 700; cursor: pointer; }
table.sit-t tr.sit-lot.on td { box-shadow: inset 0 -2px 0 var(--accent); }
table.sit-t tr.sit-txt td { color: var(--muted); font-style: italic; }
table.sit-t tr.sit-dans td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.sit-t td.neg { color: var(--red, #b3261e); }
input.inp.sit-pc { width: 78px; text-align: right; }
input.inp.sit-pc.mod { font-weight: 700; }
input.inp.sit-pc.bas { background: #fbe4e2; }
input.inp.sit-pc.haut { background: #fff1dc; }
input.inp.sit-lotpc { width: 70px; }
input.inp.sit-rev { width: 120px; text-align: right; }
.sit-dec { padding: 12px 14px; position: sticky; top: 8px; }
.sit-dec h3 { margin: 0 0 8px; font-size: 14px; }
.sit-dec .dv-l { align-items: center; }
.sit-dec .sit-m span:last-child { color: var(--red, #b3261e); }
.sit-dec .sit-net { font-size: 16px; font-weight: 700; color: var(--accent); border-top: 2px solid var(--ink, #1f2933); margin-top: 8px; padding-top: 8px; }
.sit-dec .hint { margin: 10px 0 0; }

/* ---- relevés bancaires (24/11/2026) ---- */
select.inp.bq-cat { min-width: 190px; }
select.inp.bq-cat.vide { border-color: var(--accent); color: var(--accent); }
.bq-repris { color: var(--green); font-size: 12px; white-space: nowrap; }
/* parc engins et véhicules (24/11/2026) : puces Tous / Engins / Véhicules, « Plus de détails » repliable */
.pe-puces { display: flex; gap: 6px; flex-wrap: wrap; }
.pe-puce { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 16px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.pe-puce.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* parc engins, étape 5 (25/11/2026) : choix à boutons, planning des engins */
.pe-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.pe-seg button { border: 0; border-right: 1px solid var(--line); background: var(--panel); color: var(--fg); padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pe-seg button:last-child { border-right: 0; }
.pe-seg button.on { background: var(--accent-2); color: var(--accent); font-weight: 700; }
.pe-seg button:disabled { cursor: default; opacity: .7; }
.pg-gantt { position: relative; overflow-x: auto; user-select: none; }
.pg-l { display: grid; grid-template-columns: 240px 1fr; border-top: 1px solid var(--line); min-height: 40px; }
.pg-l.pg-tete { border-top: 0; background: var(--panel-2); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; min-height: 30px; }
.pg-nom { padding: 6px 12px; border-right: 1px solid var(--line); font-size: 13px; position: sticky; left: 0; background: var(--panel); z-index: 3; }
.pg-tete .pg-nom { background: var(--panel-2); }
.pg-nom b { display: block; } .pg-nom small { color: var(--muted); }
.pg-piste { position: relative; }
.pg-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 7px 4px; white-space: nowrap; overflow: hidden; }
.pg-piste .pg-sep { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.pg-auj { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); opacity: .6; z-index: 2; }
.pg-bar { position: absolute; top: 8px; height: 24px; border-radius: 6px; color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 1; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.pg-bar.prevue { opacity: .55; border: 2px dashed rgba(255,255,255,.9); }
.pg-bar.ouverte { border-right: 4px dashed rgba(255,255,255,.95); }
.pg-bar.conflit { outline: 2px solid var(--red); outline-offset: 1px; }
.pg-bar.pg-glisse { opacity: .8; cursor: grabbing; }
.pg-bar .pg-hf { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.pg-panne { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; background: repeating-linear-gradient(45deg, var(--red-2) 0 5px, #f6c9c4 5px 10px); }
.pg-finloc { position: absolute; top: 2px; bottom: 2px; border-left: 2px dotted var(--amber); z-index: 2; }
.pg-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 8px 4px; }
.pg-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
details.pe-plus { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
details.pe-plus > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
table tr.bq-dbl td { color: var(--muted); text-decoration: line-through; }
table.bq-info td { padding: 4px 8px; }
table.bq-info td:first-child { color: var(--muted); width: 170px; }
.bq-deux { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .bq-deux { grid-template-columns: 1fr; } }
.bq-regle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---- BL au-delà du bon de commande (24/11/2026) ---- */
.bl-ex { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.bl-ex-t { margin-bottom: 8px; font-size: 13px; }
label.bl-ex-c { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; }
label.bl-ex-c:has(input:checked) { border-color: var(--accent); background: var(--accent-2); }
label.bl-ex-c small { display: block; color: var(--muted); }
.card.bl-hors { border-left: 4px solid var(--accent); margin-bottom: 14px; }

/* ---- BL client (24/11/2026) ---- */
.blc-pied { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* ---- suivi des devis (21/11/2026) : journal, relances, tableau de bord ---- */
.dv-noter { display: grid; grid-template-columns: 140px 1fr auto auto; gap: 8px; margin-top: 12px; align-items: center; }
.dv-pa { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dv-pa .inp { width: 150px; }
.dv-ty { margin-right: 4px; }
.dv-sys { color: var(--muted); font-style: italic; }
.dvs { display: flex; flex-direction: column; gap: 12px; }
.dvs-filtre { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.dvs-filtre label { display: flex; gap: 8px; align-items: center; }
.dvs-graph { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1200px) { .dvs-graph { grid-template-columns: 1fr; } }
.dvs-statuts table { width: 100%; }
.tabs button span.dvs-r { background: var(--red); color: #fff; }
/* consommables par chantier (25/11/2026) */
.cs-puces { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pill.cs-o { margin-right: 3px; font-size: 11px; }
tr.cs-det > td { background: #fcfcfd; color: var(--muted); font-size: 12.5px; cursor: pointer; }
tr.cs-det > td:first-child { padding-left: 46px; }
tr.cs-det:hover > td { background: var(--accent-2); }
.cs-cmd { color: var(--amber, #b45309); font-weight: 600; white-space: nowrap; }
/* onglet qui mène à un autre écran (Charges › Consommables, 25/11/2026) : même aspect qu'un onglet */
.tabs a[role=tab] { cursor: pointer; padding: 6px 12px; border-radius: 8px; font-weight: 500; color: var(--fg); font-size: 13px; white-space: nowrap; text-decoration: none; }
.tabs a[role=tab]:hover { background: var(--panel-2); }
.tabs a[role=tab].on { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
/* ---- analyse : tableau croisé (25/11/2026, étape 4) ---- */
.an-regl { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 10px 14px; margin: 10px 0 12px; }
.an-ch { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.an-ch > span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.an-opts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.an-opts .bt.on { background: var(--accent-2, #fff4e8); border-color: var(--accent); color: var(--accent); }
.tc-zone { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.tc-zone.sans-gr { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1300px) { .tc-zone { grid-template-columns: minmax(0, 1fr); } }
.an-carte { padding: 0; overflow: hidden; }
.an-carte .tw { max-height: calc(100vh - 330px); overflow: auto; }
table.an-pv th { position: sticky; top: 0; z-index: 1; }
table.an-pv td.an-lib { font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.an-pv td.an-c { cursor: pointer; white-space: nowrap; }
table.an-pv td.an-c:hover { background: var(--accent-2, #fff4e8); box-shadow: inset 0 0 0 1px var(--accent); }
table.an-pv td.an-c.vide { color: #c4c8ce; }
table.an-pv .an-tl { background: var(--panel-2); font-weight: 700; border-left: 1px solid var(--line); }
table.an-pv tr.tc-tot > td, .ac-pv tr.tc-tot > td { background: var(--panel-2); font-weight: 700; }
.an-n1 { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.an-n1 .h { color: var(--green); font-weight: 600; } .an-n1 .b { color: var(--red); font-weight: 600; }
.an-note { padding: 6px 14px 10px; margin: 0; }
.an-gr { padding: 4px 4px 10px; }
.an-hb { padding: 4px 14px; }
.an-hl { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 5px 0; font-size: 12px; }
.an-hn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.an-hbar { display: flex; flex-direction: column; gap: 2px; }
.an-hbar i { display: block; height: 10px; border-radius: 3px; background: var(--accent); }
.an-hbar i.p { height: 6px; background: #b8bec7; }
.an-hv { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-ep { min-width: 300px; }
/* ---- accueil personnalisé (25/11/2026, étape 4) ---- */
/* « À traiter » en pleine largeur : deux colonnes d'alertes pour ne pas repousser les cartes trop bas */
@media (min-width: 1300px) { .ac-atraiter .todo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; } }
.ac-cartes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (max-width: 1300px) { .ac-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ac-c { position: relative; min-width: 0; }
.ac-c.l2 { grid-column: span 2; }
.ac-c.l4 { grid-column: 1 / -1; }
.ac-c > .card { height: 100%; margin: 0; }
.ac-c .ac-out { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; gap: 4px; }
.ac-perso .ac-c { outline: 2px dashed #f0b27a; outline-offset: 2px; border-radius: 12px; cursor: grab; }
.ac-perso .ac-c .ac-out { display: flex; }
.ac-c .ac-out button { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 6px; font-size: 11px; padding: 1px 7px; cursor: pointer; }
.ac-cat { border: 1px solid var(--accent); padding: 12px 16px; margin-top: 14px; }
.ac-cat .ac-grp { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1300px) { .ac-cat .ac-grp { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ac-cat h5 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; color: var(--muted); }
.ac-cat label { display: flex; gap: 6px; font-size: 13px; padding: 2px 0; align-items: flex-start; }
.ac-li { list-style: none; margin: 0; padding: 4px 16px 12px; }
.ac-li li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--panel-2); font-size: 13px; }
.ac-li li.lien-td { cursor: pointer; }
.ac-li li small { display: block; color: var(--muted); font-size: 11.5px; }
.ac-li li b.r { color: var(--red); } .ac-li li b.a { color: var(--amber); }
.ac-pv { width: 100%; font-size: 12.5px; }
.ac-pv td, .ac-pv th { padding: 4px 8px; }
.ac-c .ch .ep { font-size: 11px; color: var(--accent); font-weight: 700; }
/* ---- paie (21/11/2026) : bulletin à l'écran (style « Sage / Odoo »), saisies, paramètres ---- */
.pa-mois { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bp-ctrl { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; }
.bp-saisie { padding: 12px 14px; margin-bottom: 12px; }
.bp-saisie h3 { margin: 0 0 8px; font-size: 14px; }
.bp-saisie .ck { display: flex; gap: 6px; align-items: center; font-size: 13px; padding-top: 6px; }
.bp-ecran { font-size: 12.5px; }
.bp-id { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.bp-id > div { padding: 5px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bp-id > div.l2 { grid-column: span 2; }
.bp-id span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bp-t { width: 100%; border: 1px solid var(--line); }
.bp-t th { font-size: 10.5px; }
.bp-t td { padding: 4px 7px; }
.bp-t .bp-code { color: var(--muted); width: 44px; }
.bp-t .bp-tx { font-size: 11px; color: var(--muted); }
.bp-t tr.st td { background: var(--panel-2) !important; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bp-bas { display: grid; grid-template-columns: 1.7fr 1fr; gap: 10px; margin-top: 10px; align-items: stretch; }
.bp-cum { width: 100%; border: 1px solid var(--line); font-size: 11.5px; }
.bp-cum td, .bp-cum th { padding: 3px 6px; }
.bp-net { border: 2px solid var(--fg); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; }
.bp-net > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; }
.bp-net b { font-size: 19px; }
.bp-net small { color: var(--muted); margin-top: 4px; }
.pe-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pe-t { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 6px; }
.pr-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; align-items: end; }
.pr-form .l2 { grid-column: span 2; }
.pp-tete { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.pp-tete label { display: flex; gap: 8px; align-items: center; }
.pp-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.pp-grille td .inp { width: 120px; }
@media (max-width: 1200px) { .pp-grille, .pe-grille { grid-template-columns: 1fr; } }
.stc-saisie .ck { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--fg); margin: 4px 0; }
.stc-info td { color: var(--muted); font-style: italic; }
.pp-grille .ck, .pp-sources .ck { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--fg); }
.pp-sources ul { margin: 0; padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
.stc-rq { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
/* ---- ergonomie (21/11/2026) : règles communes, contrôlées par le parcours automatique (diagnostic.js › jmvrdErgonomie) ---- */
/* 1. même hauteur pour tous les champs d'une ligne : texte, nombre, date, liste déroulante (la hauteur ne dépend plus de l'icône du calendrier) */
input.inp:not([type=checkbox]):not([type=radio]):not([type=file]), select.inp { box-sizing: border-box; height: calc(1.4em + 18px); line-height: 1.4; padding-top: 0; padding-bottom: 0; }
td input.inp:not([type=checkbox]):not([type=radio]):not([type=file]), td select.inp, .bc-champs input.inp:not([type=checkbox]):not([type=radio]):not([type=file]), .bc-champs select.inp { height: calc(1.4em + 12px); }
/* 2. panneau à droite : 2 colonnes (champ long sur toute la largeur) ; les panneaux larges (lignes, bulletin, contrat…) gardent leur grille */
.modal.tiroir .bx:not(:has(.dvc, .bp-ecran, .cnss-decl, .cc-corps, table.lignes, .fe-large)) .db .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal.tiroir .bx:not(:has(.dvc, .bp-ecran, .cnss-decl, .cc-corps, table.lignes, .fe-large)) .db .fgrid > .l2,
.modal.tiroir .bx:not(:has(.dvc, .bp-ecran, .cnss-decl, .cc-corps, table.lignes, .fe-large)) .db .fgrid > .plein { grid-column: 1 / -1; }
/* 3. blocs de saisie titrés (Pièce, Montants, Rattachement, Paiement…) */
.bloc-t { grid-column: 1 / -1; margin: 10px 0 -2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fgrid > .bloc-t:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* 5. tableaux : montants jamais coupés ; textes sur 2 lignes au plus (texte entier au survol) ; tableaux des tableaux de bord plus serrés */
.tw td.n, .tw th.n { white-space: nowrap; }
.c2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-t th { white-space: normal; }
.st-t { font-size: 12.5px; }
.st-t th, .st-t td { padding-left: 6px; padding-right: 6px; }
.st-t th { font-size: 10.5px; }
.st-t.dense { font-size: 12px; } .st-t.dense th, .st-t.dense td { padding-left: 4px; padding-right: 4px; } .st-t.dense th { font-size: 10px; letter-spacing: 0; }
/* 6. écrans de document : en-tête sur une seule ligne de base (TVA, « Objet, observation » à la hauteur des champs), unité lisible, raccourcis repliables */
.bc-champs .bt.sm, .bc-champs .bc-tva { box-sizing: border-box; font-size: 13.5px; height: calc(1.4em + 12px); display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }
@media (min-width: 1800px) { .bc-champs .bt.sm, .bc-champs .bc-tva { font-size: 14.5px; } }
@media (max-width: 1500px) { .bc-champs .bt.sm, .bc-champs .bc-tva { font-size: 13px; } }
.u-wrap .u-btn { padding: 0 11px; font-size: 13px; }
.aide-rac { font-size: 12px; }
.aide-rac summary { cursor: pointer; color: var(--muted); font-weight: 600; width: max-content; list-style: none; }
.aide-rac summary::-webkit-details-marker { display: none; }
.aide-rac[open] summary { margin-bottom: 4px; }
/* 7. pas d'espace pour un bloc vide (grilles de graphiques sans graphique, etc.) */
.g2:empty, .g3:empty, .kp:empty, .vis:empty { display: none; }
/* 4. barres d'outils : listes déroulantes bordées comme partout */
.tbar select { border: 1px solid var(--line-2); background: var(--panel); border-radius: 9px; padding: 0 30px 0 10px; height: calc(1.4em + 14px); font: inherit; font-size: 13px; color: var(--fg); width: auto; max-width: 240px; }
/* règles de gestion : libellés longs (deux lignes) → place de deux lignes réservée, champs alignés sur une même ligne (22/11/2026) */
.fg-regles > .fld > label { min-height: 2.8em; display: flex; align-items: flex-end; }
/* champs de saisie d'une barre d'outils (année, recherche…) à la hauteur de ses listes (22/11/2026 : Suivi RH › Liste CNSS) */
.tbar input.inp:not([type=checkbox]):not([type=radio]):not([type=file]) { height: calc(1.4em + 14px); font-size: 13px; }
/* ---- stock (21/11/2026) ---- */
.stk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1200px) { .stk-2 { grid-template-columns: 1fr; } }
.stk-l { width: 100%; margin: 6px 0 8px; }
.stk-l td .inp { width: 100%; }
.stk-l td.n .inp { max-width: 120px; }
.ck-l { display: flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; }
.types-mv { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.types-mv button { border: 1px solid var(--line-2); background: var(--panel); border-radius: 9px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.types-mv button.on { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }
.flux-tr { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 13px; }
.flux-tr span { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; color: var(--muted); }
.flux-tr span.on { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }
.flux-tr i { color: var(--accent); font-style: normal; }
/* ---- fenêtre à part (bon de commande, facture, proforma, devis : 21/11/2026) : le document sur toute la fenêtre ---- */
.fd-ct { height: 100vh; padding: 14px 18px; overflow: auto; }
.fd-ct .bc-ecran, .fd-ct .dv-ecran { height: calc(100vh - 28px); }
/* ---- choix d'un article par recherche, création sur place (24/11/2026) ---- */
.ca-wrap { position: relative; min-width: 220px; }
.ca-wrap > .inp { width: 100%; }
.mnu.ca-mnu { left: 0; right: auto; top: calc(100% + 4px); z-index: 45; min-width: 100%; width: max-content; max-width: 460px; max-height: 300px; overflow-y: auto; }
.mnu.ca-mnu button { justify-content: space-between; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-l td.stk-art { width: 46%; }
/* listes « façon Odoo » (25/11/2026) : barre de recherche unique, étiquettes, menus, lignes de groupe */
.bl-barre { display: flex; gap: 6px; align-items: flex-start; flex: 1 1 420px; min-width: 300px; }
.bl-boite { position: relative; flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: calc(1.4em + 18px); border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px; background: var(--bg); color: var(--faint); cursor: text; }
.bl-boite:focus-within { border-color: var(--accent); }
.bl-in { all: unset; flex: 1; min-width: 140px; padding: 5px 2px; color: var(--fg); font-size: 13.5px; }
.bl-et { display: inline-flex; align-items: center; gap: 3px; max-width: 260px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 1px 2px 1px 8px; font-size: 12.5px; color: var(--fg); }
.bl-et.fl { background: #eef4ff; border-color: #cfe0f7; }
.bl-et.gr { background: #eefaf2; border-color: #c7e8d3; }
.bl-lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-x { all: unset; cursor: pointer; padding: 0 5px; border-radius: 5px; color: var(--faint); font-size: 11px; }
.bl-x:hover { color: var(--red); background: var(--panel); }
.bl-tout { margin-left: auto; }
.mnu.bl-sugg { left: 0; right: auto; top: calc(100% + 4px); z-index: 42; min-width: 340px; }
.mnu.bl-sugg button.on-k, .mnu.bl-sugg button:hover { background: var(--accent-2); }
.mnu.bl-sugg i { font-style: normal; color: var(--faint); }
.mnu.bl-sugg b.bl-b { all: unset; font-weight: 700; color: var(--fg); text-transform: none; letter-spacing: 0; font-size: inherit; }
.mnu.bl-m { left: auto; right: 0; min-width: 240px; max-height: 70vh; overflow-y: auto; }
.mnu.bl-m .bl-aide { padding: 4px 8px; font-size: 11.5px; white-space: normal; }
.mnu.bl-fav { min-width: 290px; gap: 4px; }
.mnu.bl-fav .inp { margin: 2px 6px; width: auto; }
.mnu.bl-fav .chk { padding: 2px 8px; font-size: 13px; }
.bl-favl { display: flex; align-items: center; }
.bl-favl > button:first-child { flex: 1; }
.bl-bts { display: flex; justify-content: flex-end; padding: 4px 6px; }
tr.lg td { background: #fbf3ea; font-weight: 700; cursor: pointer; }
tr.lg.lg-1 td { background: #fcf8f3; font-weight: 600; }
tr.lg.lg-1 td:first-child { padding-left: 26px; }
.lg-fl { display: inline-block; width: 16px; color: var(--accent); }
.lg-n { color: var(--faint); font-weight: 500; }
tr.lg-in1 > td:first-child { padding-left: 28px; }
tr.lg-in2 > td:first-child { padding-left: 44px; }
/* fiches « façon Odoo » (25/11/2026) : boutons intelligents (compteurs) et barre d'état */
.bf-bande { display: flex; flex-wrap: wrap; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 0 0 12px; background: var(--panel); }
.bf-c { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 1px; padding: 7px 14px; min-width: 110px; border-right: 1px solid var(--line); cursor: pointer; }
.bf-c:last-child { border-right: 0; }
.bf-c:hover:not(.bf-info) { background: var(--accent-2); }
.bf-c:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bf-c.bf-info { cursor: default; }
.bf-c b { font-size: 16px; line-height: 1.2; }
.bf-c span { font-size: 12px; color: var(--faint); white-space: nowrap; }
.bf-c.bf-vide b { color: var(--faint); font-weight: 500; }
.bf-c.bf-r b { color: var(--red); }
.bf-c.bf-o b { color: var(--amber, #b45309); }
.bf-c.bf-v b { color: var(--green); }
.be-barre { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0; }
.be-e { all: unset; box-sizing: border-box; position: relative; padding: 5px 14px 5px 20px; margin-left: -6px; background: var(--panel-2); color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); }
.be-e:first-child { margin-left: 0; padding-left: 12px; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.be-e.be-fait { background: #e8eefb; color: #1d5fa8; }
.be-e.be-on { background: var(--accent); color: #fff; }
.be-e.be-calc { font-style: italic; }
.be-e.be-clic { cursor: pointer; }
.be-e.be-clic:hover { background: #fde6cf; color: var(--accent); }
.be-e.be-clic:focus-visible { outline: 2px solid var(--accent); }
.be-ligne { margin: 0 0 10px; flex-shrink: 0; }
.be-hors { margin-left: 8px; padding: 4px 10px; border-radius: 6px; background: #fdecea; color: var(--red); font-size: 12.5px; font-weight: 700; }
/* Liste / Kanban / Calendrier (25/11/2026) */
.cv-vues { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); flex-shrink: 0; }
.cv-vues button { all: unset; cursor: pointer; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--faint); border-right: 1px solid var(--line); white-space: nowrap; }
.cv-vues button:last-child { border-right: 0; }
.cv-vues button.on { background: var(--accent); color: #fff; }
.cv-vues button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.kb-tableau { display: grid; gap: 12px; align-items: start; padding: 12px; overflow-x: auto; }
.kb-col { background: var(--panel-2); border-radius: 12px; padding: 8px; min-height: 220px; transition: background .12s; }
.kb-col.kb-survol { background: #fde6cf; }
.kb-col.kb-calc { background: repeating-linear-gradient(45deg, var(--panel-2), var(--panel-2) 8px, #eceef1 8px, #eceef1 16px); }
.kb-tete { display: flex; align-items: baseline; gap: 6px; padding: 2px 6px 8px; cursor: default; }
.kb-replie .kb-tete, .kb-col .kb-tete[title] { cursor: pointer; }
.kb-tete b { font-size: 13.5px; }
.kb-n { color: var(--faint); font-size: 12.5px; }
.kb-i { color: var(--faint); font-size: 11.5px; }
.kb-tot { margin-left: auto; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.kb-aide { padding: 4px 6px; font-size: 12px; }
.kb-carte { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kb-carte.kb-fixe { cursor: pointer; }
.kb-carte:hover, .kb-carte:focus-visible { border-color: var(--accent); outline: none; }
.kb-l1 { display: flex; gap: 6px; align-items: baseline; }
.kb-num { font-family: Consolas, monospace; font-size: 12px; color: var(--faint); }
.kb-mt { margin-left: auto; font-weight: 700; white-space: nowrap; }
.kb-tiers { font-weight: 600; margin: 2px 0; }
.kb-bas { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--faint); }
.kb-jauge { height: 5px; background: #e9ecef; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.kb-jauge i { display: block; height: 100%; background: var(--green); }
.kb-jauge i.r { background: var(--red); }
.cl-tete { display: flex; align-items: center; gap: 6px; padding: 10px 14px; flex-wrap: wrap; }
.cl-mois { font-size: 15px; margin: 0 8px; }
.cal-ev.cl-r { color: var(--red); font-weight: 600; }
.cl-types { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 18px 12px; font-size: 13px; }
.cl-types .chk { display: inline-flex; align-items: center; gap: 5px; }
.cl-pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.cl-sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.cl-sj { background: var(--panel); min-height: 340px; padding: 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cl-sj.auj { background: var(--accent-2); }
.cl-sj h4 { margin: 0 0 4px; font-size: 12.5px; text-align: center; color: var(--muted); }
.cal-ev.cl-long { white-space: normal; padding: 4px 6px; }
.cal-ev.cl-long small { display: block; color: var(--faint); font-weight: 400; }
.cl-agenda { border-top: 1px solid var(--line); }
.cl-jr { background: var(--panel-2); padding: 6px 18px; font-weight: 700; font-size: 13px; }
.cl-li { display: grid; grid-template-columns: 14px 190px minmax(0, 1fr) 130px; gap: 10px; align-items: center; padding: 7px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.cl-li:hover, .cl-li:focus-visible { background: var(--accent-2); outline: none; }
.cl-li .n { text-align: right; font-weight: 600; }
/* jour de la semaine au-dessus du numéro (pointage, feuille de pointage ; 25/11/2026) */
small.j-sem { font-size: 9.5px; font-weight: 600; letter-spacing: 0; color: var(--muted, #6b7380); text-transform: uppercase; }
th.pt-hj small.j-sem { font-size: 8.5px; letter-spacing: -0.2px; }
/* le cadre d'un tableau (.tw, défilement) coupait la liste et la fenêtre « Nouvel article » du choix d'article (25/11/2026) : on la laisse déborder */
.tw:has(.ca-wrap) { overflow: visible; }
.mnu.ca-mnu button.on-k { background: var(--panel-2); }
.mnu.ca-mnu .ca-creer { color: var(--accent); font-weight: 600; }
.mnu.ca-mnu .ca-vide { padding: 6px 10px; white-space: normal; }
.mnu.ca-cree { gap: 6px; padding: 10px; min-width: 260px; }
.mnu.ca-cree .ca-bts { display: flex; gap: 6px; justify-content: flex-end; }
/* ---- longues listes : « Afficher plus » (25/11/2026) ---- */
.aff-plus { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px 16px; border-top: 1px solid var(--line); }
/* ---- BL : articles livrés en plus (24/11/2026) ---- */
table.bl tr.bl-plus td.n .inp { max-width: 130px; margin-left: auto; }
table.bl tr.bl-plus-t td { background: var(--panel-2); font-size: 13px; }
/* ---- CNSS : employé à ajouter, liste et bouton sur une ligne (24/11/2026) ---- */
.cnss-ajout { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cnss-ajout select.inp { flex: 0 1 460px; width: auto; min-width: 0; }
.cnss-ajout .bt { flex: none; white-space: nowrap; }
/* ---- liste vide expliquée (composant ListeVide, 24/11/2026) ---- */
.vide-explique { background: var(--accent-2); border-radius: 8px; padding: 8px 12px; color: inherit; }
/* ---- site web : fenêtre d'envoi de fichiers (EnvoiFichiers, 26/11/2026) ---- */
.ef-modal { max-width: 560px; }
.ef-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 18px; border: 2px dashed var(--line, #d5d9de); border-radius: 12px; text-align: center; cursor: pointer; position: relative; }
.ef-zone:hover { border-color: var(--accent); }
.ef-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* ---- simplification (26/11/2026) : écrans voisins en onglets en haut de la page ---- */
.ecr-onglets { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line, #e3e6ea); margin: 0 0 14px; }
.ecr-onglets a { padding: 8px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ecr-onglets a:hover { color: var(--accent); }
.ecr-onglets a.on { color: var(--accent); border-bottom-color: var(--accent); }
/* fiches courtes : l'essentiel, puis « Plus de détails » replié */
.plus-details { border-top: 1px dashed var(--line, #e3e6ea); margin-top: 10px; padding-top: 8px; }
.plus-details > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; list-style-position: outside; }
.plus-details > summary small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.plus-details[open] > summary { margin-bottom: 8px; }

/* police Nunito embarquée (téléchargée le 27/11/2026 de Google Fonts, licence libre OFL) : fonctionne sans internet */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/Nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/Nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/Nunito-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/Nunito-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ===== NOUVEAU STYLE « Clair aéré » (validé le 27/11/2026, maquettes v10 / v11) =====
   Clair ou sombre au choix sur chaque poste (bouton en haut, gardé par le navigateur), police Nunito (repli Segoe UI),
   colonne d'icônes Pochoir dans les modules (pas sur l'accueil), un onglet par écran et par document (6 au plus). */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --panel-2: #f6f7f9; --line: #e6e8ec; --line-2: #d7dbe1;
  --fg: #111827; --muted: #6b7280; --faint: #9ca3af;
  --accent: #c2410c; --accent-2: #fff3eb; --accent-fg: #ffffff; --accent-t: #9a3412; --survol: #eef0f3; --onglets: #eceef2;
  --red: #c0262d; --red-2: #fef1f1; --green: #15803d; --green-2: #ecfdf3; --amber: #a15c07; --amber-2: #fef7e6;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 6px 20px -12px rgba(17,24,39,.18);
  --f-head: "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --r: 16px; --contour: #fff;
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1d212a; --line: #272c36; --line-2: #333a47;
  --fg: #f1f3f7; --muted: #9098a6; --faint: #6b7280;
  --accent: #ea580c; --accent-2: #3a2316; --accent-fg: #ffffff; --accent-t: #fdba74; --survol: #232833; --onglets: #0b0d11;
  --red: #f87171; --red-2: #3a1a1c; --green: #4ade80; --green-2: #14301f; --amber: #fbbf24; --amber-2: #3a2b10; --blue: #7fb0f5; --blue-2: #16263d;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px -14px rgba(0,0,0,.6); --contour: #171a21; color-scheme: dark;
}
body { font-size: 14.5px; transition: background-color .25s ease, color .25s ease; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tw { border-color: var(--line); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { color: var(--fg); background-color: var(--panel-2); }

/* icônes Pochoir : rond plein foncé, dessin blanc épais, liseré pointillé de la couleur de l'application */
.pc { position: relative; display: inline-grid; place-items: center; border-radius: 50%; background: var(--d); outline: 2px dashed var(--c); outline-offset: 3px; flex-shrink: 0; width: 64px; height: 64px; vertical-align: middle; }
.pc svg { position: absolute; inset: 0; margin: auto; width: 72%; height: 72%; overflow: visible; --sw: 3.4; }
.pc.e { width: 48px; height: 48px; } .pc.e svg { --sw: 3.8; width: 76%; height: 76%; }
.pc.m { width: 36px; height: 36px; outline-width: 1.5px; outline-offset: 2px; } .pc.m svg { width: 82%; height: 82%; --sw: 4.6; }
.pc.p { width: 22px; height: 22px; outline: none; } .pc.p svg { width: 86%; height: 86%; --sw: 5.2; }
.pk { fill: none; stroke: #fff; stroke-width: var(--sw, 3.4); stroke-linecap: round; stroke-linejoin: round; } .pkf { fill: #fff; }
.pk.pkg { stroke-width: calc(var(--sw, 3.4) * 1.7); }
/* icône de l'écran devant son titre (image posée par Layout dans --ic-titre) */
.ct[style*="--ic-titre"] .page > .ph h1 { display: flex; align-items: center; gap: 12px; }
.ct[style*="--ic-titre"] .page > .ph h1::before { content: ""; width: 38px; height: 38px; flex-shrink: 0; background: var(--ic-titre) center / contain no-repeat; }
.pc0 { --c: #fdba74; --d: #c2410c; } .pc1 { --c: #5b8fd1; --d: #1f4f8a; } .pc2 { --c: #6fa862; --d: #2f6b2a; } .pc3 { --c: #f08a3e; --d: #b4470c; }
.pc4 { --c: #e2b23a; --d: #8a5a00; } .pc5 { --c: #3fb29e; --d: #0f6b5e; } .pc6 { --c: #8484e0; --d: #3f3fa8; } .pc7 { --c: #db7a99; --d: #9b2f55; }
.pc8 { --c: #e8735f; --d: #a3301d; } .pc9 { --c: #a57bc9; --d: #63368a; } .pc10 { --c: #b98657; --d: #7a4d22; } .pc11 { --c: #7590bd; --d: #2f4a78; } .pc12 { --c: #8b97a8; --d: #3e4a5c; }
.pas { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #dc2626; color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; border: 2px solid var(--contour); line-height: 1; }

/* coquille : colonne d'icônes, barre du haut, onglets */
.app.jr { display: flex; height: 100vh; }
.app.jr > .mn { flex: 1; min-width: 0; }
.jr-rail { width: 92px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 10px 8px; gap: 1px; overflow-y: auto; flex-shrink: 0; scrollbar-width: none; }
.jr-rail .pc.m { width: 32px; height: 32px; }
.jr-logo { width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; margin-bottom: 10px; flex-shrink: 0; }
.jr-logo img { width: 42px; }
.jr-rail > a:not(.jr-logo) { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 2px; border-radius: 14px; font-size: 11.5px; font-weight: 700; color: var(--fg); opacity: .85; text-decoration: none; position: relative; text-align: center; line-height: 1.2; transition: background-color .2s ease; }
.jr-rail > a:not(.jr-logo):hover { background: var(--survol); opacity: 1; }
.jr-rail > a.on { background: var(--accent-2); color: var(--accent-t); opacity: 1; }
.jr-rail > a .pas { position: absolute; top: 2px; right: 10px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 4px; }
.jr-rail .jr-ouv { position: absolute; left: -8px; top: 14px; width: 4px; height: 22px; border-radius: 0 3px 3px 0; background: var(--accent); }
.app.jr .hd { height: 58px; padding: 0 20px; gap: 12px; background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.logo-h { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--fg); text-decoration: none; padding: 6px 10px 6px 4px; border-radius: 12px; white-space: nowrap; font-family: var(--f-head); }
.logo-h:hover { background: var(--survol); }
.logo-h img { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.app.jr .srch { margin-left: 0; width: min(440px, 36vw); height: 40px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.hd-dr { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.app.jr .ib { width: 40px; height: 40px; border-radius: 50%; }
.app.jr .ib .cl-n { position: absolute; top: 2px; right: 0; }
.jr-sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0 10px; height: 32px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.jr-sync .dt { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-2); }
.jr-sync.lk .dt { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-2); }
.jr-theme { display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.jr-theme button { border: 0; background: transparent; border-radius: 999px; height: 30px; padding: 0 11px; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.jr-theme button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.app.jr .bt { border-radius: 999px; }
.jr-tabs { display: flex; align-items: flex-end; gap: 4px; padding: 8px 14px 0; background: var(--onglets); border-bottom: 1px solid var(--line); flex-shrink: 0; min-height: 46px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.jr-ong { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 10px; border-radius: 12px 12px 0 0; color: var(--fg); opacity: .8; font-weight: 700; font-size: 13.5px; cursor: pointer; max-width: 210px; min-width: 0; border: 1px solid transparent; border-bottom: 0; text-decoration: none; flex-shrink: 1; }
.jr-ong.acc { flex-shrink: 0; }
.jr-ong:hover { background: var(--survol); opacity: 1; }
.jr-ong.on { background: var(--panel); opacity: 1; border-color: var(--line); margin-bottom: -1px; height: 39px; }
.jr-ong.acc { padding: 0 12px; }
.jr-ong .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-ong .modif { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.jr-ong .mini { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); opacity: 0; cursor: pointer; font-size: 12px; }
.jr-ong:hover .mini, .jr-ong.on .mini, .jr-ong .mini:focus-visible { opacity: 1; }
.jr-ong .mini:hover { background: var(--survol); color: var(--fg); }
.jr-compte { margin-left: auto; align-self: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 4px 6px 12px; white-space: nowrap; }
.mu.jr-menu-d { position: fixed; width: 290px; z-index: 75; }
.mu-i[disabled] { opacity: .5; cursor: not-allowed; }
.app.jr .ct { padding: 22px 26px 40px; }

/* cloche détaillée : rangée par application, bouton pour agir, filtres */
.mu.jr-cl { width: 470px; max-height: min(600px, calc(100vh - 80px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; right: -50px; }
.jr-cl-h { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.jr-cl-h b { font-size: 16px; } .jr-cl-h > span { color: var(--muted); font-size: 12.5px; }
.jr-cl-f { width: 100%; display: flex; gap: 6px; margin-top: 6px; }
.jr-cl-f button { border: 1px solid var(--line); background: transparent; border-radius: 999px; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--fg); }
.jr-cl-f button.on { background: var(--accent-2); color: var(--accent-t); border-color: transparent; }
.jr-cl-c { overflow: auto; padding: 6px 0; }
.jr-cl-m { display: flex; align-items: center; gap: 8px; padding: 10px 16px 4px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.jr-cl-m em { font-style: normal; margin-left: auto; }
.jr-cl-l { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.jr-cl-l:hover { background: var(--survol); }
.jr-cl-l > div { flex: 1; min-width: 0; } .jr-cl-l b { display: block; font-size: 13.5px; } .jr-cl-l small { color: var(--muted); font-size: 12px; }
.jr-cl-l.r b { color: var(--red); }
.jr-cl-p { border-top: 1px solid var(--line); padding: 8px 12px; display: flex; justify-content: center; }

/* accueil : grille des applications */
.jr-apps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 8px; padding: 24px 12px 20px; margin-bottom: 16px; }
.jr-app { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; border-radius: 18px; padding: 8px 4px; text-decoration: none; color: inherit; transition: background-color .2s ease; }
.jr-app:hover { background: var(--survol); }
.jr-app .pc { transition: transform .25s ease; } .jr-app:hover .pc { transform: translateY(-3px); }
.jr-app .jr-ic { position: relative; }
.jr-app .jr-ic .pas { position: absolute; top: -4px; right: -6px; }
.jr-app b { font-size: 15px; font-weight: 800; color: var(--fg); font-family: var(--f-head); }
.jr-app small { color: var(--muted); font-size: 12.5px; margin-top: -6px; }
.jr-app small.r { color: var(--red); font-weight: 700; }
.jr-app .ouv { font-size: 11px; font-weight: 800; color: var(--accent-t); background: var(--accent-2); border-radius: 999px; padding: 0 8px; margin-top: -4px; }
@media (max-width: 1100px) { .jr-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* code administrateur à la connexion (27/11/2026) */
.inp.cx-code { font-size: 22px; font-weight: 800; letter-spacing: 6px; text-align: center; }
.info-ok { background: var(--green-2); color: var(--green); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.cx-liens { display: flex; justify-content: space-between; gap: 10px; width: 100%; flex-wrap: wrap; }
.codes-secours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 30px; font: 700 17px var(--f-mono); background: var(--panel-2); border-radius: 12px; padding: 14px 20px; margin: 10px 0; }

@media print {
  body.imprime-codes * { visibility: hidden; }
  body.imprime-codes .codes-impression, body.imprime-codes .codes-impression * { visibility: visible; }
  body.imprime-codes .codes-impression { position: absolute; left: 0; top: 0; width: 100%; }
}

/* recherche Ctrl K : écrans trouvés et icône de chaque résultat */
.rch-ecrans { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 10px; }
.rch-ecrans > small { color: var(--muted); font-weight: 800; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; margin-right: 4px; }
.rch-ecrans .bt { gap: 8px; } .rch-ecrans .bt small { color: var(--muted); font-weight: 600; }
.rch-ic { display: inline-flex; vertical-align: middle; margin-right: 8px; }

/* tableau de bord d'un module : ses écrans en gros boutons */
.jr-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.jr-tete h1 { font-size: 24px; font-weight: 800; }
.jr-ecrans { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 14px 0 22px; }
.jr-ecr { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 16px 16px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.jr-ecr:hover { border-color: var(--accent); transform: translateY(-2px); }
.jr-ecr.ouvert { border-color: var(--accent); }
.jr-ecr .jr-ic { position: relative; } .jr-ecr .jr-ic .pas { position: absolute; top: -6px; right: -8px; }
.jr-ecr-t b { display: block; font-size: 15.5px; color: var(--fg); } .jr-ecr-t small { color: var(--muted); font-size: 13px; font-weight: 600; } .jr-ecr-t small.r { color: var(--red); font-weight: 800; }
.jr-ecr-nv { grid-column: 1 / -1; justify-self: start; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; font-size: 12.5px; font-weight: 700; color: var(--accent-t); cursor: pointer; }
.jr-ecr-nv:hover { background: var(--accent-2); border-color: var(--accent); }
.jr-ecr-o { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; color: var(--accent-t); background: var(--accent-2); border-radius: 999px; padding: 0 8px; }

/* ===== GARDE-FOU DES TABLEAUX (20/11/2026) — À LAISSER EN DERNIER =====
   Une case de tableau reste une case et une ligne reste une ligne, quelle que soit la classe posée dessus.
   Sans cela, une classe prévue pour un autre élément (.sub en display:block, .n en grid dans .etape, .hint en block…)
   faisait sortir la case du tableau : colspan ignoré, colonnes décalées (défauts de 0.21.0 et 0.38.1).
   Pour aligner des boutons dans une case : <td><div class="cel-actions">…</div></td>, jamais display sur le <td>.
   Pour masquer une case : attribut hidden. */
td, th { display: table-cell !important; }
tr { display: table-row !important; }
td[hidden], th[hidden], tr[hidden] { display: none !important; }
.cel-actions { display: flex; gap: 6px; align-items: center; }