/* ==========================================================================
   EMS Gestion — feuille de style
   Charte EMS Electronics : rouge EMS sur noir, police Inter. Thème clair disponible.
   ========================================================================== */

@font-face { font-family: "Inter EMS"; src: url("../fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter EMS"; src: url("../fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0c0e;
  --panel: #141619;
  --panel-2: #1b1e23;
  --panel-3: #22262c;
  --ink: #f2f4f6;
  --muted: #a0a7b0;
  --faint: #757d87;
  --line: #24272d;
  --line-strong: #373c44;
  --brand: #f60000;
  --brand-text: #ff4a4a;
  --brand-soft: rgba(246, 0, 0, .16);
  --ok: #2fbf8f; --ok-soft: rgba(47, 191, 143, .15);
  --warn: #e8942e; --warn-soft: rgba(232, 148, 46, .15);
  --bad: #ff5a52; --bad-soft: rgba(255, 90, 82, .15);
  --info: #5598e7; --info-soft: rgba(85, 152, 231, .15);
  --series-1: #3987e5;
  --series-2: #d95926;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .38);
  --radius: 12px;
  --radius-s: 8px;
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #f2f3f5;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --panel-3: #eef0f3;
  --ink: #101216;
  --muted: #5b6370;
  --faint: #868d98;
  --line: #e2e5ea;
  --line-strong: #c8cdd6;
  --brand: #e00000;
  --brand-text: #c40000;
  --brand-soft: #fdeceb;
  --ok: #0e7c63; --ok-soft: #e4f5f0;
  --warn: #a85b10; --warn-soft: #fdf0e3;
  --bad: #c42222; --bad-soft: #fdecea;
  --info: #1c5cab; --info-soft: #e6f0fc;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --shadow: 0 1px 2px rgba(16, 18, 22, .06), 0 8px 24px rgba(16, 18, 22, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Inter EMS", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-text); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* --- Écrans d'accueil (connexion, dossier) --------------------------------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.gate-card.wide { width: min(640px, 100%); }
.gate-logo { width: 240px; max-width: 80%; height: auto; display: block; margin: 0 auto 18px; }
.gate-title { font-size: 20px; font-weight: 700; text-align: center; margin: 0 0 6px; }
.gate-sub { color: var(--muted); text-align: center; margin: 0 0 22px; }
.gate-card .field { margin-bottom: 14px; }
.gate-card .btn { width: 100%; justify-content: center; }
.gate-prog { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin: 6px 0 12px; }
.gate-prog > i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .35s ease; }
.gate-etape { margin-bottom: 0; font-size: 13px; }
.gate-foot { margin-top: 16px; text-align: center; color: var(--faint); font-size: 12px; }

/* --- Coque -------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brandbar { padding: 16px 18px 10px; }
.brandbar img { width: 100%; max-width: 190px; height: auto; display: block; }
.side-app { padding: 0 18px 10px; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--muted); }
/* « connecté en tant que » : bandeau toujours visible en haut */
.imite-bandeau { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 10001; display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 14px; border-radius: 0 0 10px 10px; background: #b45309; color: #fff; font: 600 13px/1.3 system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.3); max-width: calc(100% - 20px); }
.imite-bandeau .btn { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; }
/* recherche en haut de la barre latérale */
.side-search { display: flex; align-items: center; gap: 6px; margin: 0 14px 10px; padding: 0 8px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-2); color: var(--faint); }
.side-search:focus-within { border-color: var(--brand); color: var(--ink); }
.side-search svg { width: 15px; height: 15px; flex: none; }
.side-search-input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font-size: 13px; outline: none; }
.side-search-input::-webkit-search-cancel-button { display: none; }
.side-search-kbd { font: 600 10px/1 system-ui, sans-serif; padding: 3px 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--faint); flex: none; }
.side-search:focus-within .side-search-kbd { display: none; }
.side-search-pop { position: fixed; z-index: 65; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.side-search-pop[hidden] { display: none; }
.side-search-list { overflow-y: auto; padding: 6px; min-height: 0; flex: 1; }
.side-search-pied { display: flex; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); flex: none; }
.side-search-pied kbd { font: inherit; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel-2); margin-right: 3px; }
.palette-titre mark { background: none; color: var(--brand-text); font-weight: 700; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 6px; }
/* groupes repliables : le titre est un bouton ; replié, seul l'écran ouvert reste visible */
button.nav-section { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; text-align: left; font-family: inherit; border-radius: var(--radius-s); }
button.nav-section:hover { color: var(--muted); }
.nav-section-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-section-badge { letter-spacing: 0; text-transform: none; }
.nav-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 4px 0 2px; transition: transform .15s; flex: none; opacity: .7; }
.nav-section[aria-expanded="false"] .nav-chevron { transform: rotate(-45deg); margin-top: 0; }
.nav-groupe.replie > .nav-item:not(.active) { display: none; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; border-radius: var(--radius-s); cursor: pointer; color: var(--muted); text-align: left; }
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--ink); }
.nav-item.active svg { color: var(--brand-text); }
.nav-item .badge { margin-left: auto; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.me-name { font-weight: 700; font-size: 13px; }
.me-role { color: var(--faint); font-size: 12px; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--warn); }
.side-actions { display: flex; gap: 6px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 28px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar h1 { font-size: 20px; margin: 0; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.content { flex: 1; overflow: auto; padding: 20px 28px 40px; }
.offline-banner { background: var(--warn-soft); color: var(--warn); padding: 8px 28px; font-size: 13px; border-bottom: 1px solid var(--line); }
/* le bandeau flotte en haut de la zone principale : il n'en décale pas le contenu quand il apparaît ou disparaît */
.main { position: relative; }
.offline-banner:not([hidden]) { position: absolute; top: 0; left: 0; right: 0; z-index: 30; backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.topbar > div:first-child { min-width: 0; }

/* Fenêtre étroite (volet Aircall ouvert à côté, petit écran) : en-tête sur deux lignes, menu réduit aux icônes */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding: 12px 18px 10px; }
  .topbar-actions { margin-left: 0; justify-content: flex-start; width: 100%; }
  .content { padding: 16px 18px 32px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 64px 1fr; }
  .brandbar { padding: 12px 8px 6px; }
  .side-app, .nav-section, .nav-item > span:not(.badge), .me > div:last-child, .sync span, .side-clock .day { display: none; }
  .nav-groupe.replie > .nav-item:not(.active) { display: flex; }   /* menu en icônes : pas de titres de groupe, tout reste visible */
  .side-clock { padding: 0 4px 10px !important; text-align: center; }
  .side-clock .time { font-size: 15px !important; }
  .nav { padding: 4px 8px 12px; }
  .nav-item { justify-content: center; padding: 9px 0; position: relative; }
  .nav-item .badge { position: absolute; top: 2px; right: 2px; margin: 0; }
  .side-foot { padding: 10px 6px; align-items: center; }
  .side-actions { flex-direction: column; align-items: center; }
  .side-foot .sync { font-size: 0; justify-content: center; }
}

/* --- Boutons, champs --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--panel-2); padding: 7px 14px; border-radius: var(--radius-s); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 13px; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--panel-2); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field .hint, .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  padding: 8px 10px; outline: none; min-height: 36px;
}
textarea.input { resize: vertical; min-height: 72px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); border-bottom: 1px solid var(--line); padding: 10px 0 4px; }
.checks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; }

/* --- Cartes, KPI ------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
/* dans une grille, l'espacement vient de la grille : sinon les cartes des lignes suivantes se décalent */
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: -2px 0 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-head .sub { color: var(--faint); font-size: 12px; min-width: 0; }
.card-head .right { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid + .grid, .grid + .card, .card + .grid { margin-top: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { color: var(--faint); font-size: 12px; margin-top: 2px; }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { border-color: var(--line-strong); }

/* --- Badges ------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.badge.count { background: var(--brand); color: #fff; padding: 1px 7px; }

/* --- Barre d'outils de liste ---------------------------------------------------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .search { min-width: 260px; flex: 0 1 320px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.seg button { border: 0; background: var(--panel-2); padding: 7px 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--brand-soft); color: var(--ink); }
.count-note { color: var(--faint); font-size: 12px; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius-s); padding: 8px 12px; margin-bottom: 12px; position: sticky; top: -20px; z-index: 5; }
.bulkbar .spacer { flex: 1; }
.filter-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.filter-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; }
.filter-row .input { min-height: 32px; padding: 5px 8px; width: auto; }
.chip-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-strong); cursor: pointer; }
.chip-check.on { background: var(--brand-soft); border-color: var(--brand); }
.chip-check input { width: 13px; height: 13px; accent-color: var(--brand); }
.filter-chips { gap: 6px; margin-bottom: 10px; }
.sync-opts { margin-top: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); }
.filter-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--brand-soft); color: var(--ink); border-radius: 999px; padding: 2px 4px 2px 10px; }
.chip .icon-btn { padding: 2px; }
.chip svg { width: 13px; height: 13px; }
.toast { display: flex; align-items: center; }

/* --- Tableau ------------------------------------------------------------------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); cursor: pointer; white-space: nowrap; user-select: none; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--panel-2); }
.tbl tr.group td { background: var(--panel-2); font-weight: 700; font-size: 12px; color: var(--muted); padding: 7px 12px; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.tbl .strong { font-weight: 700; }
.tbl .muted { color: var(--faint); }
.tbl td.wrap { white-space: normal; }
.tbl td .sub { color: var(--faint); font-size: 12px; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 15px; }

/* --- Kanban ------------------------------------------------------------------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.kcol.over { border-color: var(--brand); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-weight: 700; font-size: 13px; }
.kcol-head .badge { margin-left: auto; }
.kcol-body { overflow-y: auto; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 11px; cursor: pointer; font-size: 13px; }
.kcard:hover { border-color: var(--line-strong); }
.kcard .t { font-weight: 700; }
.kcard .m { color: var(--faint); font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.kcard .tags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }

/* --- Fiche détaillée ----------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13px; }
.props dt { color: var(--faint); }
.props dd { margin: 0; overflow-wrap: anywhere; }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.tl-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; color: var(--muted); }
.tl-icon.call { background: var(--info-soft); color: var(--info); }
.tl-icon.ai { background: var(--brand-soft); color: var(--brand-text); }
.tl-head { font-size: 12px; color: var(--faint); }
.tl-body { white-space: pre-wrap; font-size: 13px; margin-top: 2px; }
.ai-box { background: var(--panel-2); border-left: 3px solid var(--brand); border-radius: 6px; padding: 8px 10px; margin-top: 6px; white-space: pre-wrap; font-size: 13px; }
.steps { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.step { flex: 1; min-width: 90px; text-align: center; padding: 7px 6px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--faint); border-radius: 6px; cursor: pointer; border: 1px solid var(--line); }
.step.done { background: var(--brand-soft); color: var(--ink); }
.step.cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.step.lost { background: var(--bad-soft); color: var(--bad); }

/* --- Planning ------------------------------------------------------------------ */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal-h { background: var(--panel); padding: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-d { background: var(--panel); min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-d.out { background: var(--panel-2); }
.cal-d.out .cal-n { color: var(--faint); }
.cal-d.today .cal-n { background: var(--brand); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-n { font-size: 12px; font-weight: 700; }
.cal-ev { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--info-soft); color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--series-1); }
.cal-ev.full { border-left-color: var(--ok); }
.cal-ev.cancel { opacity: .5; text-decoration: line-through; }
.fill { height: 6px; background: var(--panel-3); border-radius: 6px; overflow: hidden; min-width: 60px; }
.fill > i { display: block; height: 100%; background: var(--series-1); border-radius: 6px; }

/* --- Graphiques ---------------------------------------------------------------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis text { fill: var(--faint); font-size: 11px; stroke: none; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-strong); stroke-width: 1; }
.chart .bar1 { fill: var(--series-1); stroke: none; }
.chart .bar2 { fill: var(--series-2); stroke: none; }
.chart .line1 { stroke: var(--ink); stroke-width: 2; fill: none; }
.chart .hit { fill: transparent; stroke: none; cursor: default; }
.chart .hit:hover { fill: var(--panel-3); opacity: .5; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 140px; }
.tip b { display: block; margin-bottom: 4px; }
.tip .row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.tip .row span:last-child { color: var(--ink); font-weight: 600; }

/* --- Messagerie ---------------------------------------------------------------- */
.chat { display: grid; grid-template-columns: 250px 1fr; height: calc(100vh - 150px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; }
.chat-side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 12px 6px 6px; display: flex; align-items: center; }
.chat-side h4 .icon-btn { margin-left: auto; padding: 2px; }
.chat-side h4.chat-groupe { cursor: pointer; user-select: none; gap: 4px; }
.chat-side h4.chat-groupe:hover { color: var(--ink); }
.chat-chevron { width: 12px; display: inline-block; font-size: 10px; }
.chat-nb { margin-left: 4px; font-weight: 400; opacity: .7; }
.chat-outils { margin-left: auto; display: flex; gap: 2px; }
.chat-outils .icon-btn.on { background: var(--brand-soft); color: var(--brand-text); }
.chat-etat { margin: 6px 0 10px; font-size: 13px; }
.chat-etat .btn { margin-left: 6px; }
.chat-etat-lien { font-size: 12px; margin: 4px 0 10px; }
.msg .msg-suppr { opacity: 0; padding: 1px; margin-left: 6px; vertical-align: middle; }
.msg:hover .msg-suppr, .msg .msg-suppr:focus { opacity: .7; }
.msg .msg-suppr svg { width: 13px; height: 13px; }
.chan { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--muted); text-align: left; }
.chan:hover { background: var(--panel-2); color: var(--ink); }
.chan.on { background: var(--brand-soft); color: var(--ink); }
.chan .badge { margin-left: auto; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.msg-head { font-size: 12px; color: var(--faint); }
.msg-head b { color: var(--ink); margin-right: 6px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-src { font-size: 11px; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { min-height: 40px; max-height: 160px; }
.day-sep { text-align: center; font-size: 11px; color: var(--faint); margin: 4px 0; }

/* --- Modales, toasts ------------------------------------------------------------ */
.modal-host { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: grid; place-items: center; z-index: 50; padding: 24px; }
.modal { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); width: min(760px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal.small { width: min(460px, 100%); }
.modal.large { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); }
.modal-foot .left { margin-right: auto; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--panel); border: 1px solid var(--line-strong); border-left: 4px solid var(--ok); box-shadow: var(--shadow); border-radius: 8px; padding: 10px 14px; max-width: 420px; font-size: 13px; }
.toast.error { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }

.note { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; color: var(--muted); font-size: 13px; }
.note.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.note.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.note + .note, .note + .card, .card + .note { margin-top: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
.secret { font-family: Consolas, monospace; letter-spacing: .05em; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.files { display: flex; flex-direction: column; gap: 4px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--panel-3); padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.file-vignette { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-3); cursor: pointer; flex: 0 0 auto; }
.perm { font-size: 12px; }
.perm td, .perm th { padding: 6px 8px !important; text-align: center !important; }
.perm td:first-child, .perm th:first-child { text-align: left !important; min-width: 220px; }

/* pointage */
.pt-clock { font-size: 44px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pt-actions .btn { flex: 1; justify-content: center; min-height: 44px; font-size: 15px; }
.pt-sum { display: flex; gap: 22px; margin: 12px 0 4px; font-size: 14px; }
.pt-frise { margin-top: 8px; min-width: 160px; }
.pt-line { position: relative; height: 12px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.pt-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.pt-seg.work { background: var(--ok); }
.pt-seg.pause { background: var(--warn); }
.pt-seg.live { opacity: .65; }
.pt-ticks { position: relative; height: 14px; font-size: 10px; color: var(--faint); }
.pt-ticks span { position: absolute; top: 1px; transform: translateX(-50%); }
.pt-week td { vertical-align: middle; }
.pt-week td:last-child { min-width: 220px; }
.pt-week .badge { margin: 0 4px 4px 0; }
.tbl tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
/* Ligne mise en avant dans un tableau : le créneau retenu comme le meilleur */
.tbl tr.on td { background: var(--brand-soft); }
.tbl tr.on td:first-child { box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }
.pt-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pt-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.pt-person > div:nth-child(2) { flex: 1; min-width: 0; }
.pt-mobile-only { width: 100%; text-align: center; }
/* comptes bancaires */
.bank-total { background: var(--brand-soft); border-radius: var(--radius-s); padding: 14px 16px; }
.bank-amount { font-size: 28px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* écran de pointage : QR code renouvelé toutes les 30 s */
/* --- Éditeur de modèles (type Word) -------------------------------------------- */
.rte { border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--panel-2); }
.rte-tb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rte-btn { border: 1px solid transparent; background: none; color: var(--ink); min-width: 30px; height: 28px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 13px; }
.rte-btn:hover { background: var(--panel-2); border-color: var(--line-strong); }
.rte-btn:disabled { opacity: .35; cursor: default; }
.rte-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px; }
.rte-page { background: #fff; color: #111; padding: 26px 30px; min-height: 560px; max-height: 70vh; overflow: auto; font-family: "Segoe UI", Arial, sans-serif; font-size: 10.5pt; line-height: 1.45; outline: none; margin: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.rte-page:focus { box-shadow: 0 0 0 2px var(--brand); }
.rte-src { border: 0; border-radius: 0; min-height: 560px; }

/* --- Lecteur Aircall ------------------------------------------------------------ */
/* Clavier du module Téléphone */
.tel-pad { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.tel-key { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; }
.tel-key:hover { background: var(--panel-3); border-color: var(--line-strong); }
.tel-key:active { transform: translateY(1px); }
.tel-del { grid-column: 3; font-size: 14px; }

.ems-player { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); width: min(720px, calc(100% - 40px)); }
.ems-player > svg { width: 20px; height: 20px; color: var(--brand-text); flex: none; }
.ems-player .strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.al-team table td, .al-team table th { padding: 6px 8px; vertical-align: middle; }
.al-team .table-wrap { max-height: 360px; overflow: auto; }

/* --- Photo d'une pièce (webcam), rapprochement bancaire ------------------------ */
.cam-video { display: block; width: 100%; max-height: 62vh; background: #000; border-radius: var(--radius-s); object-fit: contain; }
.rap-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); margin-bottom: 6px; gap: 10px; }
.rap-row .badge { flex: none; }

/* --- Devis et factures --------------------------------------------------------- */
.fac-lines td { vertical-align: top; padding: 6px 6px; }
.fac-lines td:first-child { min-width: 260px; }
.fac-lines .input { min-height: 30px; padding: 4px 6px; font-size: 13px; }
.fac-tot { text-align: right; font-size: 13px; line-height: 1.7; min-width: 220px; }

/* --- Parcours Qualiopi -------------------------------------------------------- */
.qp-matrix th { text-align: center; font-size: 11px; white-space: normal; max-width: 90px; }
.qp-matrix th:first-child { text-align: left; }
.qp-cell { text-align: center; cursor: pointer; }
.qp-cell:hover { background: var(--panel-2); }
.qp-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3); color: var(--muted); font-weight: 700; font-size: 13px; }
.qp-dot.ok { background: var(--ok-soft); color: var(--ok); }
.qp-dot.info { background: var(--info-soft); color: var(--info); }
.qp-dot.warn { background: var(--warn-soft); color: var(--warn); }
.qp-dot.bad { background: var(--bad-soft); color: var(--bad); }
.qp-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.qp-step:last-child { border-bottom: 0; }
.qp-step .row .btn { margin: 2px 0; }
.qp-timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 18px; }
.qp-tl { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.qp-tl.na { opacity: .45; }
.qp-tl-date { color: var(--faint); font-size: 12px; min-width: 52px; }

/* --- Ressources humaines ------------------------------------------------------- */
.rh-alerts { display: flex; flex-direction: column; gap: 6px; }
.rh-alert { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); font-size: 13px; cursor: pointer; flex-wrap: wrap; }
.rh-alert:hover { border-color: var(--line-strong); }
.rh-alert > span:nth-child(2) { flex: 1; min-width: 200px; }
.rh-contrat { padding: 12px 0; border-top: 1px solid var(--line); }
.rh-contrat:first-of-type { border-top: 0; }
.rh-cal th.rh-day, .rh-cal td.rh-cell { padding: 4px 2px; text-align: center; font-size: 10.5px; min-width: 22px; }
.rh-cal th.rh-day.we, .rh-cal td.rh-cell.we, .rh-cal th.rh-day.fer, .rh-cal td.rh-cell.fer { background: var(--panel-3); color: var(--faint); }
.rh-cal th.rh-day.today { color: var(--brand-text); font-weight: 800; }
.rh-cal td.rh-cell { cursor: pointer; height: 30px; position: relative; }
.rh-cal td.rh-cell.abs { background: color-mix(in srgb, var(--abs) 28%, transparent); color: var(--ink); font-weight: 700; }
.rh-cal td.rh-cell.abs.am { background: linear-gradient(90deg, color-mix(in srgb, var(--abs) 28%, transparent) 50%, transparent 50%); }
.rh-cal td.rh-cell.abs.pm { background: linear-gradient(90deg, transparent 50%, color-mix(in srgb, var(--abs) 28%, transparent) 50%); }
.rh-cal td.rh-cell.abs.pend { background-image: repeating-linear-gradient(45deg, transparent 0 4px, color-mix(in srgb, var(--abs) 45%, transparent) 4px 8px); }
.rh-bul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rh-bul-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.rh-bul-item svg { width: 16px; height: 16px; color: var(--faint); }
.rh-bul-item.ok svg { color: var(--ok); }
.rh-bul-item > span:nth-child(2) { flex: 1; }

.pt-screen { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pt-screen-qr { width: min(62vh, 520px); aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 14px; }
.pt-screen-qr svg { width: 100%; height: 100%; display: block; }
.pt-screen-clock { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-screen-bar { width: min(62vh, 520px); height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.pt-screen-bar i { display: block; height: 100%; background: var(--brand); transition: width .5s linear; }
.modal:fullscreen { width: 100%; max-height: none; border-radius: 0; justify-content: center; }
.modal:fullscreen .pt-screen-qr, .modal:fullscreen .pt-screen-bar { width: min(78vh, 900px); }

@media (max-width: 1200px) {
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
}
/* --- Aircall : appels en cours ------------------------------------------------- */
.al-live { display: flex; flex-direction: column; gap: 8px; }
.al-call { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); flex-wrap: wrap; }
.al-call .avatar { flex: none; }
.al-call .al-who { flex: 1 1 220px; min-width: 0; }
.al-call .al-who .strong, .al-call .al-who .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-call .al-acts { display: flex; gap: 6px; align-items: center; margin-left: auto; flex: none; }
.card-head .right.al-head { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }

/* --- Encaissements (section ajoutée par l'agent encaissements) --------------------- */
.grid.g4:has(> .enc-kpi) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.enc-fac { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; margin: -2px -6px; border: 0; border-radius: var(--radius-s); background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.enc-fac:hover { background: var(--brand-soft); }
.enc-hors { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.enc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.enc-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.enc-tot { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; font-size: 13px; min-width: 0; }
.enc-amount { font-size: 18px; }
@media (max-width: 1200px) { .grid.g4:has(> .enc-kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Charges : blocs, crédits & leasing (section ajoutée par l'agent charges) ------ */
/* Onglets [Charges | Crédits & leasing] dans l'en-tête, carte « Par bloc » et bascule « Chiffres : sélection | tout » */
.charges-tabs { margin-right: 6px; }
.charges-top { margin-bottom: 16px; padding: 14px 16px; }
.charges-top .card-head { margin-bottom: 10px; flex-wrap: wrap; row-gap: 6px; }
.charges-top .card-head .right.charges-kpi-mode { font-size: 12px; color: var(--muted); gap: 8px; }
.charges-bloc-tbl th { cursor: default; }
.charges-bloc-tbl th, .charges-bloc-tbl td { padding: 6px 10px; font-size: 13px; }
.charges-bloc-tbl td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.charges-bloc-tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); }
/* Fenêtre « Blocs… » : un bloc = une ligne avec ordre (▲ ▼), nom, catégories cochables */
.bloc-list { display: flex; flex-direction: column; gap: 8px; }
.bloc-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.bloc-order { display: flex; flex-direction: column; gap: 0; flex: none; }
.bloc-order .icon-btn { padding: 2px 6px; font-size: 11px; line-height: 1.2; }
.bloc-order .icon-btn:disabled { opacity: .3; cursor: default; }
.bloc-body { flex: 1 1 auto; min-width: 0; }
.bloc-head { flex-wrap: nowrap; }
.bloc-head .bloc-name { flex: 1 1 200px; min-width: 120px; }
.bloc-rest { font-size: 12px; white-space: nowrap; }
.bloc-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bloc-cats .chip-check { max-width: 100%; }
.bloc-cats .chip-check .faint { font-size: 11px; }
/* Crédits & leasing : progression des échéances, fenêtre détail d'un contrat */
.cr-prog { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.cr-prog .fill { width: 90px; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cr-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cr-tot { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; font-size: 13px; min-width: 0; }
.cr-amount { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-detail .form-section { margin-top: 14px; }
.cr-ech { margin-top: 10px; }
.cr-ech .tbl td { white-space: nowrap; }
.cr-ech .tbl td:last-child { white-space: normal; }
@media (max-width: 900px) { .cr-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Filtres : favoris (section ajoutée par l'agent filtres) ----------------------- */
/* Rangée de vues favorites sous la barre d'outils d'une liste (ligne pleine largeur du .toolbar) */
.fav-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; min-width: 0; margin-top: -2px; }
.fav-chips-label { font-size: 12px; font-weight: 700; color: var(--brand-text); margin-right: 2px; line-height: 1; }
.fav-chip { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 4px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--muted); cursor: pointer; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-chip:hover { color: var(--ink); border-color: var(--faint); }
.fav-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.fav-chip.fav-chip-add { background: none; border-style: dashed; }
.fav-chip.fav-chip-add:hover { color: var(--brand-text); border-color: var(--brand); }

/* --- Comptabilité : écritures (section ajoutée par l'agent compta-ecritures) ------- */
.ecr-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ecr-row { display: grid; grid-template-columns: 150px minmax(160px, 2fr) 120px 120px minmax(130px, 1fr) 34px; gap: 8px; align-items: start; }
.ecr-row.head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px; }
.ecr-row .input { min-height: 32px; padding: 5px 8px; width: 100%; }
.ecr-row .input.num { text-align: right; font-variant-numeric: tabular-nums; }
.ecr-row .icon-btn { margin-top: 2px; }
.ecr-hint { font-size: 11px; color: var(--faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecr-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border-radius: var(--radius-s); font-size: 13px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ecr-foot.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ecr-foot.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.ecr-foot .spacer { flex: 1; }
@media (max-width: 900px) {
  .ecr-row { grid-template-columns: 1fr 1fr; }
  .ecr-row.head { display: none; }
}

/* --- Comptabilité : états et liasse (section ajoutée par l'agent compta-etats) ----- */
/* Tableaux d'états (compte de résultat, bilan, SIG) : en-têtes, sous-lignes par compte, totaux, colonne variation */
.etat-body > .card + .card, .etat-body > .note + .card, .etat-body > .count-note + .card { margin-top: 16px; }
.etat-body > .note + .note { margin-top: 12px; }
.etat-table th { cursor: default; }
.etat-table th.etat-code, .etat-table td.etat-code { width: 56px; color: var(--faint); font-size: 12px; white-space: nowrap; }
.etat-table td.etat-label { white-space: normal; max-width: none; min-width: 240px; }
.etat-table td.etat-label .sub { font-weight: 400; }
.etat-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.etat-table tr.etat-head td { background: var(--panel-2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 7px 12px; }
.etat-table tr.etat-sub td { color: var(--faint); font-size: 12px; padding-top: 4px; padding-bottom: 4px; }
.etat-table tr.etat-sub td.etat-label { padding-left: 30px; }
.etat-table tr.etat-total td { font-weight: 700; background: var(--panel-2); border-top: 1px solid var(--line-strong); }
.etat-table tr.etat-grand td { font-weight: 800; background: var(--brand-soft); border-top: 2px solid var(--brand); }
.etat-table td.adj > span { font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.etat-table .etat-reset { padding: 0 4px; margin-left: 4px; font-size: 15px; line-height: 1; vertical-align: middle; color: var(--brand-text); }
/* Formulaires de liasse : numéro de ligne, libellé, valeur calculée ou saisie (mode Ajuster) */
.liasse-form td.etat-code span { display: inline-block; min-width: 36px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 4px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel); }
.etat-table td.etat-edit { padding-top: 4px; padding-bottom: 4px; }
.etat-table .etat-inp { width: 136px; min-height: 28px; padding: 3px 8px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.etat-table td.etat-edit.adj .etat-inp { font-weight: 700; border-color: var(--brand); }
.etat-mention { margin-top: 12px; }
.etat-docs { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1200px) { .etat-table td.etat-label { min-width: 160px; } .etat-table .etat-inp { width: 110px; } }

/* --- Prévisionnel IA (section ajoutée par l'agent previsionnel) -------------------- */
/* Onglet « Prévisionnel IA » de la comptabilité : données transmises, formulaire, rapport */
.prev .table-wrap { max-height: 440px; }
/* Indicateur d'attente pendant la rédaction par l'assistant (une génération dure plusieurs minutes) */
.prev-wait { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--panel-2); }
.prev-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.prev-wait-text { min-width: 0; }
.prev-wait-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.prev-wait-sub { font-size: 12px; margin-top: 2px; }
.prev-wait-acts { display: flex; gap: 8px; }
.prev-wait-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.prev-wait-bar i { display: block; height: 100%; width: 3%; background: var(--brand); border-radius: 999px; transition: width .6s ease; }
/* Éditeur du rapport (page blanche type Word) */
.prev-editor { margin-top: 4px; }
.prev-editor .rte-page { max-height: 75vh; }
/* Typographie du rapport à l'écran (aperçu, fenêtres) ; le PDF embarque sa propre feuille de style */
.prev-report { line-height: 1.5; }
.prev-report h1 { font-size: 20px; margin: 14px 0 6px; }
.prev-report h2 { font-size: 16px; margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--brand-text); }
.prev-report h3 { font-size: 14px; margin: 14px 0 4px; }
.prev-report h4 { font-size: 13px; margin: 10px 0 3px; }
.prev-report p { margin: 6px 0; }
.prev-report ul, .prev-report ol { margin: 4px 0 8px; padding-left: 22px; }
.prev-report li { margin: 2px 0; }
.prev-report table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 13px; }
.prev-report th, .prev-report td { border: 1px solid var(--line-strong); padding: 5px 8px; vertical-align: top; }
.prev-report th { background: var(--panel-2); text-align: left; font-weight: 700; }
.prev-report td.num, .prev-report th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prev-report td.center, .prev-report th.center { text-align: center; }
.prev-report table.wide { font-size: 11px; }
.prev-report table.wide th, .prev-report table.wide td { padding: 3px 4px; }
.prev-report blockquote { margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--brand); background: var(--brand-soft); }
.prev-report code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; background: var(--panel-3); padding: 0 4px; border-radius: 4px; }
.prev-report pre { background: var(--panel-3); padding: 8px 10px; border-radius: var(--radius-s); white-space: pre-wrap; font-size: 12px; }
.prev-report hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.prev-report .meta { color: var(--faint); font-size: 12px; margin-bottom: 10px; }
@media (max-width: 900px) { .prev-wait { grid-template-columns: auto minmax(0, 1fr); } .prev-wait-acts { grid-column: 1 / -1; } }

/* --- Tableau de bord personnalisable -------------------------------------------- */
.tdb-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tdb-w { min-width: 0; position: relative; }
.tdb-body > .card, .tdb-body > .kpi { margin: 0; }
.tdb-grid.editing .tdb-w { outline: 1px dashed var(--line-strong); outline-offset: 4px; border-radius: var(--radius); cursor: grab; }
.tdb-grid.editing .tdb-body { pointer-events: none; opacity: .85; }
.tdb-grid.editing .tdb-w { touch-action: none; user-select: none; }
.tdb-w.flottant { box-shadow: 0 18px 44px rgba(0, 0, 0, .38); transform: rotate(.5deg) scale(1.01); opacity: .96; outline-color: var(--brand) !important; transition: transform .1s; }
.tdb-w.tdb-place { outline: 0 !important; border: 2px dashed var(--brand); border-radius: var(--radius); background: var(--brand-soft); min-height: 60px; }
body.tdb-glisse, body.tdb-glisse * { cursor: grabbing !important; user-select: none; }
.tdb-body.fixe { overflow: auto; }
.tdb-body.fixe > .card { min-height: 100%; }
.tdb-poignee { position: absolute; z-index: 6; touch-action: none; }
.tdb-poignee.droite { top: 10px; bottom: 14px; right: -12px; width: 12px; cursor: ew-resize; }
.tdb-poignee.bas { left: 10px; right: 14px; bottom: -12px; height: 12px; cursor: ns-resize; }
.tdb-poignee.coin { right: -13px; bottom: -13px; width: 18px; height: 18px; cursor: nwse-resize; }
.tdb-poignee::after { content: ''; position: absolute; border-radius: 3px; background: var(--line-strong); transition: background .12s; }
.tdb-poignee.droite::after { top: 50%; left: 4px; width: 4px; height: 36px; margin-top: -18px; }
.tdb-poignee.bas::after { left: 50%; top: 4px; height: 4px; width: 36px; margin-left: -18px; }
.tdb-poignee.coin::after { right: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 2px 2px 5px 2px; background: var(--brand); opacity: .75; }
.tdb-poignee:hover::after, .tdb-w.etire .tdb-poignee::after { background: var(--brand); opacity: 1; }
.tdb-w.etire { outline-color: var(--brand) !important; }
.tdb-taille { position: absolute; right: 10px; bottom: 10px; z-index: 7; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; pointer-events: none; font-variant-numeric: tabular-nums; }
body.tdb-etire-x, body.tdb-etire-x * { cursor: ew-resize !important; user-select: none; }
body.tdb-etire-y, body.tdb-etire-y * { cursor: ns-resize !important; user-select: none; }
body.tdb-etire-xy, body.tdb-etire-xy * { cursor: nwse-resize !important; user-select: none; }
.tdb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 6px; padding: 4px 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 12px; }
.tdb-handle { cursor: grab; color: var(--faint); font-size: 14px; line-height: 1; }
.tdb-name { flex: 1 1 60px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 600; }
.tdb-tools { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.tdb-tools .icon-btn { padding: 3px 5px; font-size: 11px; }
.tdb-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.tdb-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
/* écrans étroits : un élément par ligne, deux pour les plus petits (un tiers de largeur ou moins) */
@media (max-width: 1100px) {
  .tdb-w { grid-column: span 12 !important; }
  .tdb-w.etroit { grid-column: span 6 !important; }
}

/* --- Blocs et regroupements (charges, encaissements), charges isolées ------------ */
/* Carte « Soldes par bloc » : regroupements (sous-total), blocs indentés, TOTAL GLOBAL */
.soldes-tbl tr.soldes-grp td { background: var(--panel-2); border-top: 1px solid var(--line-strong); }
.soldes-tbl tr.soldes-in td:first-child { padding-left: 26px; }
.soldes-tbl tr.soldes-in td:first-child .soldes-name::before { content: '↳ '; color: var(--muted); }
.soldes-tbl tr.soldes-off td { color: var(--muted); }
.soldes-tbl tr.soldes-off td.num { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.soldes-tbl tr.soldes-sep td { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 12px; cursor: default; }
.soldes-tbl .soldes-hors { font-size: 11px; }
.soldes-tbl th.soldes-chk, .soldes-tbl td.soldes-chk { width: 56px; text-align: center; }
.soldes-tbl td.soldes-chk input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }
.soldes-tbl tfoot tr.soldes-total td { font-size: 14px; }
.soldes-tbl tfoot tr.soldes-note td { font-weight: 400; font-size: 12px; color: var(--muted); border-top: 0; }
/* Fenêtre « Blocs… » : outils par bloc (solde global, regrouper, séparer), section Regroupements */
.bloc-section { margin: 16px 0 8px; font-size: 14px; }
.bloc-section:first-of-type { margin-top: 4px; }
.bloc-tools { flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.bloc-tools .bloc-global { font-size: 12px; }
.bloc-tools .bloc-merge { width: auto; min-width: 150px; max-width: 240px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.bloc-row.bloc-off { opacity: .8; }
.bloc-row.bloc-off .bloc-name { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.bloc-empty { font-size: 12px; padding: 4px 2px; }
/* Fenêtres « Isoler… » / « Réintégrer… » : liste de charges cochables filtrable */
.iso-tools { gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.iso-tools .search { flex: 1 1 220px; min-width: 0; }
.iso-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; padding: 4px 2px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.iso-list .iso-item { padding: 4px 8px; border-radius: 6px; align-items: baseline; }
.iso-list .iso-item:hover { background: var(--panel-2); }

/* --- Bandeau « nouvelle version disponible » ------------------------------------ */
.maj-bandeau { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100% - 36px)); padding: 12px 14px; background: var(--panel); border: 1px solid var(--line-strong); border-left: 3px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); }
.maj-bandeau > svg { width: 20px; height: 20px; color: var(--brand-text); flex: none; }

/* --- Kbis / RIB : informations reconnues ---------------------------------------- */
.sd-row { gap: 8px; margin-bottom: 6px; flex-wrap: nowrap; }
.sd-lab { flex: 0 0 180px; color: var(--muted); font-size: 12px; font-weight: 600; }
.sd-row .input { flex: 1; min-width: 0; }
@media (max-width: 700px) { .sd-row { flex-wrap: wrap; } .sd-lab { flex: 1 1 100%; } }

/* --- Applications mobiles (QR codes) -------------------------------------------- */
.app-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.app-qr { background: #fff; padding: 8px; border-radius: var(--radius-s); flex: none; line-height: 0; }
.app-qr svg { width: 132px; height: 132px; display: block; }
.app-info { flex: 1 1 220px; min-width: 0; }
.app-url { font-weight: 700; word-break: break-all; }
.app-steps { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

@media print {
  .side, .topbar-actions, .toolbar { display: none !important; }
  .shell { display: block; }
  .content { overflow: visible; }
}

/* ---------- messagerie : émojis, aperçus d'images, wizz ---------- */
.emoji-wrap { position: relative; display: inline-flex; }
.emoji-panel {
  position: absolute; bottom: 110%; left: 0; z-index: 60; width: 320px; max-height: 300px; overflow: auto;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.emoji-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { font-size: 20px; line-height: 1; background: none; border: 0; border-radius: 8px; padding: 5px; cursor: pointer; }
.emoji-grid button:hover { background: var(--panel-3); }
.chat-img { max-width: 260px; max-height: 220px; border-radius: 10px; margin-top: 6px; display: block; cursor: pointer; border: 1px solid var(--line); }
.msg-wizz { font-weight: 600; color: var(--brand-text); display: flex; align-items: center; gap: 6px; }
/* fiche client envoyée dans la messagerie */
.msg-fiche { display: flex; align-items: center; gap: 10px; margin-top: 6px; max-width: 460px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--panel-2); cursor: pointer; }
.msg-fiche:hover { border-color: var(--brand); }
.msg-fiche .faint { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-fiche-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.msg-fiche-ic svg { width: 18px; height: 18px; }
.msg-fiche-go { flex: none; font-size: 12.5px; font-weight: 600; color: var(--brand-text); }
@keyframes wizz-shake {
  0%, 100% { transform: translate(0, 0) }
  10% { transform: translate(-8px, 4px) } 20% { transform: translate(8px, -4px) }
  30% { transform: translate(-7px, -3px) } 40% { transform: translate(7px, 3px) }
  50% { transform: translate(-5px, 2px) } 60% { transform: translate(5px, -2px) }
  70% { transform: translate(-3px, -1px) } 80% { transform: translate(3px, 1px) } 90% { transform: translate(-1px, 0) }
}
body.wizz-shake { animation: wizz-shake .7s ease-in-out; }
@media (prefers-reduced-motion: reduce) { body.wizz-shake { animation: none; } }
@media (max-width: 640px) { .emoji-panel { width: 280px; left: auto; right: 0; } .emoji-grid { grid-template-columns: repeat(7, 1fr); } }

/* ---------- glisser-déposer de fichiers dans une conversation ---------- */
.drop-zone { position: relative; }
.drop-zone::after {
  content: 'Déposez vos documents ou vos photos ici';
  position: absolute; inset: 6px; z-index: 40; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--brand-text); border-radius: 14px; background: var(--brand-soft);
  color: var(--ink); font-weight: 600; pointer-events: none;
}

/* ---------- raccourcis favoris (pied de la barre latérale, toutes les pages) ---------- */
/* Boîte de réception : liste à gauche, message ouvert à droite (comme une messagerie) */
.inbox { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 0; height: calc(100vh - 230px); min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inbox-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.inbox-tools { padding: 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.inbox-search { width: 100%; }
.inbox-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.inbox-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.inbox-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.inbox-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.inbox-count { font-size: 11px; opacity: .75; }
.inbox-list { flex: 1; overflow-y: auto; }
.inbox-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; }
.inbox-row:hover { background: var(--panel-2); }
.inbox-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.inbox-row .avatar { width: 34px; height: 34px; font-size: 12px; }
.inbox-row-main { min-width: 0; }
.inbox-row-top { display: flex; align-items: baseline; gap: 8px; }
.inbox-de { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.inbox-row.neuf .inbox-de { color: var(--ink); font-weight: 700; }
.inbox-quand { font-size: 11px; color: var(--faint); white-space: nowrap; }
.inbox-sujet { font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row.neuf .inbox-sujet { font-weight: 600; }
.inbox-extrait { font-size: 12px; color: var(--faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-tag { font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.inbox-read { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 16px 18px; gap: 4px; }
.inbox-read > .empty { margin: auto; }
.inbox-read-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.inbox-read-head h3 { margin: 0; font-size: 17px; }
.inbox-read-body { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px 0; line-height: 1.55; }
/* Inbox à trois volets : les boîtes et leurs dossiers, la liste, le message */
.inbox.inbox-3 { grid-template-columns: 224px minmax(280px, 360px) 1fr; }
.inbox-nav { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel-2); }
.inbox-nav-top { padding: 10px; border-bottom: 1px solid var(--line); }
.inbox-nav-top .btn { width: 100%; justify-content: center; }
.inbox-nav-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.inbox-nav-foot { padding: 8px 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.inbox-nav-foot .btn { justify-content: flex-start; }
.inbox-box { padding: 4px 0 6px; }
.inbox-box + .inbox-box { border-top: 1px solid var(--line); }
.inbox-box-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 4px 12px; }
.inbox-box-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-box-sub { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-box-acts { display: flex; gap: 2px; flex: none; opacity: .35; transition: opacity .15s; }
.inbox-box:hover .inbox-box-acts, .inbox-box.on .inbox-box-acts { opacity: 1; }
.inbox-box-acts .icon-btn { width: 26px; height: 26px; }
.inbox-box-acts .icon-btn svg { width: 14px; height: 14px; }
.inbox-folder { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 10px 5px 22px; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
.inbox-folder svg { width: 15px; height: 15px; flex: none; }
.inbox-folder:hover { background: var(--panel); color: var(--ink); }
.inbox-folder.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.inbox-folder .inbox-count { margin-left: auto; }
.inbox-folder .inbox-count.neuf { color: var(--brand-text); font-weight: 700; opacity: 1; }
.inbox-titre { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.inbox-3 { grid-template-columns: 1fr; }
  .inbox-nav { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .inbox-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .inbox-list { max-height: 320px; }
}

/* Mentions « @ » : nom mis en valeur dans le fil, et liste de sélection sous le curseur */
.mention { background: var(--brand-soft); color: var(--brand-text); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.mention.ia { background: var(--info-soft, var(--panel-3)); color: var(--info-text, var(--ink)); }
.mention-pop { position: fixed; z-index: 70; width: 250px; max-height: 240px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.32); padding: 4px; }
.mention-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: left; font-size: 13px; cursor: pointer; }
.mention-item svg { width: 16px; height: 16px; color: var(--muted); }
.mention-item:hover, .mention-item.on { background: var(--panel-3); }
.chat-input .icon-btn.on { background: var(--brand); color: #fff; }

/* Fenêtre de discussion déroulée depuis le raccourci de la messagerie */
.chat-pop { position: fixed; z-index: 60; width: 380px; max-width: calc(100vw - 24px); height: 460px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 44px rgba(0,0,0,.34); overflow: hidden; }
.chat-pop-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat-pop-head b { flex: 1; }
.chat-pop-pick { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.chat-pop-pick select { width: 100%; }
.chat-pop-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-pop .chat-input { padding: 8px 10px; }
.chat-pop .chat-input textarea { min-height: 36px; max-height: 120px; }
.chat-pop .empty { padding: 20px 8px; text-align: center; }
.favbar .icon-btn { position: relative; }
.fav-count { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 10px; line-height: 15px; text-align: center; font-weight: 700; }

.favbar .icon-btn { width: 32px; height: 32px; border-radius: 9px; opacity: .78; }
.favbar .icon-btn:hover { opacity: 1; background: var(--panel-3); }
.favbar .icon-btn.on { opacity: 1; background: var(--brand-soft); color: var(--brand-text); }
.favbar .favbar-edit { opacity: .45; margin-left: auto; }
.favbar .favbar-edit:hover { opacity: .9; }
/* barre latérale réduite : les raccourcis s'empilent sur une colonne, sans pousser le reste hors de l'écran */
@media (max-width: 900px) {
  .favbar { justify-content: center; gap: 2px; max-height: 132px; overflow-y: auto; }
  .favbar .favbar-edit { margin-left: 0; }
}

/* Messageries des réseaux : fil de discussion d'une conversation */
.bulle { display: inline-block; padding: 8px 12px; border-radius: 12px; background: var(--panel-3); border: 1px solid var(--line); }
.bulle.moi { background: var(--brand-soft); border-color: transparent; }

/* En-tête de page : menu « Plus » des actions secondaires */
.head-menu { position: relative; }
.head-menu .menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.20);
  display: flex; flex-direction: column; gap: 4px; }
.head-menu .menu-pop .btn { width: 100%; justify-content: flex-start; }

/* Menu : l'entrée « Organiser le menu », discrète, en bas de la navigation */
.nav-item.nav-organiser { margin-top: 14px; opacity: .55; font-size: 13px; }
.nav-item.nav-organiser:hover { opacity: 1; }

/* Recherche globale (Ctrl+K) */
.palette-host { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.palette { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-head svg { width: 18px; height: 18px; flex: none; }
.palette-input { flex: 1; border: 0; background: none; color: var(--ink); font-size: 16px; outline: none; min-width: 0; }
.palette-list { overflow-y: auto; padding: 6px; }
.palette-genre { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-s); background: none; color: inherit; text-align: left; cursor: pointer; }
.palette-item svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.palette-item.on { background: var(--brand-soft); }
.palette-item.on svg { color: var(--brand-text); }
.palette-txt { min-width: 0; flex: 1; }
.palette-titre { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-sous { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-vide { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.palette-help { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); }
.palette-help kbd { font: inherit; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel-2); margin-right: 3px; }

/* Petite fenêtre d'appel (Aircall) : en bas à droite sur tous les écrans, déplaçable, réductible */
.al-mini { position: fixed; right: 18px; bottom: 18px; z-index: 45; width: 320px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.al-mini-bandeau { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; cursor: move; user-select: none; }
.al-mini-bandeau span { flex: 1; }
.al-mini-bandeau .icon-btn { width: 26px; height: 26px; }
.al-mini-corps { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.al-mini-call .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-mini-call .faint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-mini-duree { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--ok); flex: none; }
.al-mini-duree.sonne { color: var(--warn); animation: al-sonne 1s ease-in-out infinite; }
@keyframes al-sonne { 50% { opacity: .35; } }
.al-mini.reduit { width: 260px; }
.al-mini.reduit .al-mini-corps { padding: 8px 12px; }

/* Tableaux paginés : ligne « Afficher plus » */
.tbl tr.more td { padding: 8px; border-bottom: 0; }

/* Organigramme des agents IA : arbre en boîtes reliées, nœuds déplaçables */
.org { padding: 8px 12px 16px; width: max-content; min-width: 100%; box-sizing: border-box; }
.org-vue { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.org-vue { cursor: grab; }
.org-vue.deplace { cursor: grabbing; user-select: none; }
.org-vue .org-noeud { cursor: move; }
.org-vue .org-noeud button { cursor: pointer; }
.org-zoom { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.org-zoom .icon-btn { font-size: 16px; font-weight: 700; width: 28px; }
.org-zoom-val { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.org-niveau { display: flex; justify-content: center; gap: 24px; align-items: flex-start; }
.org-branche { display: flex; flex-direction: column; align-items: center; position: relative; }
.org-branche > .org-niveau { margin-top: 26px; position: relative; }
.org-branche > .org-niveau::before { content: ''; position: absolute; top: -26px; left: 50%; width: 2px; height: 26px; background: var(--line-strong); }
.org-branche > .org-niveau > .org-branche::before { content: ''; position: absolute; top: -13px; left: 50%; width: 2px; height: 13px; background: var(--line-strong); }
.org-branche > .org-niveau > .org-branche:not(:only-child)::after { content: ''; position: absolute; top: -13px; height: 2px; background: var(--line-strong); left: 0; right: 0; }
.org-branche > .org-niveau > .org-branche:first-child:not(:only-child)::after { left: 50%; }
.org-branche > .org-niveau > .org-branche:last-child:not(:only-child)::after { right: 50%; }
.org-noeud { width: 210px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; cursor: grab; position: relative; }
.org-noeud.chef { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.org-noeud.inactif { opacity: .55; }
.org-noeud.cible { outline: 2px dashed var(--brand); outline-offset: 2px; }
.org-noeud.traine { opacity: .4; }
.org-nom { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-sous { font-size: 12px; color: var(--muted); margin-top: 2px; }
.org-acts { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.org-racine { margin: 0 auto 14px; max-width: 520px; border: 2px dashed var(--line-strong); border-radius: 12px; padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.org-racine.cible { border-color: var(--brand); color: var(--brand-text); }
@media (hover: none) { .msg .msg-suppr { opacity: .6; } }

/* --- Organiser le menu : menus et entrées à glisser --------------------------------------------- */
.org-menu { display: flex; flex-direction: column; gap: 10px; }
.org-sec { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.org-titre { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; background: var(--panel-2); border-radius: 10px 10px 0 0; cursor: grab; touch-action: none; user-select: none; }
.org-titre .org-nom { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.org-liste { display: flex; flex-direction: column; padding: 4px; min-height: 34px; }
.org-liste:empty { border: 2px dashed var(--line); border-radius: 8px; margin: 6px; }
.org-liste:empty::before { content: 'Déposez une entrée ici'; color: var(--faint); font-size: 12px; padding: 6px 10px; }
.org-ent { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: grab; touch-action: none; user-select: none; }
.org-ent:hover { background: var(--panel-2); }
.org-ent.masquee { opacity: .5; }
.org-ent > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.org-ent .org-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-poignee { color: var(--faint); font-size: 14px; line-height: 1; }
.org-place { border: 2px dashed var(--brand); border-radius: 8px; background: var(--brand-soft); margin: 2px 0; }
.org-flottant { background: var(--panel); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); border-radius: 8px; opacity: .97; }
.org-flottant.org-sec { border-color: var(--brand); }
body.org-glisse, body.org-glisse * { cursor: grabbing !important; user-select: none; }

/* --- Activité de l'équipe : barres heure par heure ----------------------------------------------- */
.act-heures { display: flex; align-items: flex-end; gap: 2px; height: 28px; min-width: 120px; }
.act-h { position: relative; flex: 1; height: 100%; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.act-h i { position: absolute; left: 0; right: 0; bottom: 0; display: block; }
.act-h i.o { background: var(--line-strong); }
.act-h i.a { background: var(--brand); }
.act-mention { font-size: 11px; color: var(--faint); padding: 2px 10px 6px; cursor: help; }

/* --- Centre d'aide ------------------------------------------------------------------------------- */
.aide { max-width: 920px; }
.aide-tete { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.aide-recherche { flex: 1 1 280px; }
.aide-rubriques { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.aide-puce { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.aide-puce.on { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.aide-liste { display: flex; flex-direction: column; gap: 6px; }
.aide-rub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 12px 2px 2px; }
.aide-item { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.aide-item.ouvert { border-color: var(--brand); }
.aide-titre { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: none; border: 0; color: var(--ink); font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; font-family: inherit; }
.aide-chev { color: var(--faint); }
.aide-article { padding: 0 16px 14px; line-height: 1.55; }
.aide-article p { margin: 0 0 8px; }
.aide-etapes { margin: 4px 0 12px; padding: 0; list-style: none; counter-reset: etape; }
.aide-etapes li { counter-increment: etape; position: relative; padding: 2px 0 2px 32px; margin-bottom: 6px; }
.aide-etapes li::before { content: counter(etape); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.aide-liste-puces { margin: 4px 0 12px 18px; padding: 0; }
.aide-liste-puces li { margin-bottom: 5px; }
.aide-inter { font-size: 13.5px; margin: 16px 0 6px; color: var(--ink); }
.aide-astuce, .aide-attention { margin: 8px 0 12px; padding: 9px 12px; border-radius: var(--radius-s); border-left: 3px solid #2f9e6b; background: rgba(47, 158, 107, .1); font-size: 13.5px; }
.aide-attention { border-left-color: #d9822b; background: rgba(217, 130, 43, .1); }
.aide-astuce b, .aide-attention b { margin-right: 4px; }
.aide-fig { margin: 10px 0 14px; }
.aide-fig img { display: block; width: 100%; max-width: 1440px; height: auto; aspect-ratio: auto 16 / 10; border: 1px solid var(--line-strong); border-radius: var(--radius-s); cursor: zoom-in; box-shadow: 0 4px 18px rgba(0, 0, 0, .25); }
.aide-fig.tel img { width: 250px; max-width: 100%; aspect-ratio: auto 390 / 844; border-radius: 18px; }
.aide-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.aide-fig.tel figcaption { max-width: 250px; }
.aide-tels { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.aide-tels .aide-fig { flex: 0 1 250px; }
.aide-faq details { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin-bottom: 6px; background: var(--panel-2); }
.aide-faq summary { cursor: pointer; font-weight: 600; }
.aide-faq details p { margin: 8px 0 2px; }
.aide-voir { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; }
.aide-lien { border: 0; background: none; color: var(--brand); cursor: pointer; font: inherit; padding: 2px 4px; text-decoration: underline; }
.aide-pied { margin-top: 12px; }
.aide-titre-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aide-resume { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.aide-guide:empty { display: none; }
.aide-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 8px; }
.aide-tuile { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 0; overflow: hidden; cursor: pointer; font-family: inherit; color: var(--ink); }
.aide-tuile:hover { border-color: var(--brand); }
.aide-tuile-img { height: 104px; overflow: hidden; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.aide-tuile-img img { width: 100%; display: block; }
.aide-tuile-img.tel { display: flex; justify-content: center; }
.aide-tuile-img.tel img { width: 46%; }
.aide-tuile-txt { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px 11px; font-size: 13px; }
.aide-tuile-txt span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.aide-zoom { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .86); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.aide-zoom img { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.aide-zoom-legende { color: #e8e8e8; font-size: 13px; margin-top: 12px; max-width: 900px; text-align: center; }
.aide-zoom-x { position: absolute; top: 14px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .4); color: #fff; font-size: 16px; cursor: pointer; }
@media (max-width: 600px) { .aide-tuiles { grid-template-columns: 1fr 1fr; } .aide-tuile-img { height: 80px; } .aide-article { padding: 0 12px 12px; } .aide-fig.tel img, .aide-tels .aide-fig { max-width: 100%; } }
.aide-vide { padding: 14px; }
.icon-btn.aide-contexte { font-weight: 700; font-size: 15px; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; }

/* --- Tableau de bord formation ------------------------------------------------------------------ */
.ftdb-barres { display: flex; flex-direction: column; gap: 9px; }
.ftdb-barre { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.ftdb-barre.clic { cursor: pointer; }
.ftdb-barre.clic:hover .ftdb-lib { color: var(--brand); }
.ftdb-barre .fill { width: 100%; }
.ftdb-lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftdb-val { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ftdb-todo { max-height: 430px; overflow: auto; }

/* --- Poste de commandement ---------------------------------------------------------------------- */
body.cmd-page { height: 100vh; overflow: hidden; }
body.cmd-page #root { height: 100%; }
.cmd-app { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.cmd-barre-haut { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; transition: opacity .4s, transform .4s; }
.cmd-barre-haut .btn { padding: 5px 11px; }
.cmd-logo { height: 26px; }
.cmd-titre { font-size: 15px; }
.cmd-barre-haut .cmd-choix { width: auto; flex: 0 0 auto; min-width: 160px; max-width: 260px; padding: 5px 8px; }
.cmd-espace { flex: 1; }
.cmd-heure { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmd-etat { font-size: 12px; color: #2f9e6b; }
.cmd-etat::before { content: "\25CF  "; }
.cmd-etat.retard { color: #d9822b; }
body.cmd-repos { cursor: none; }
.cmd-app { position: relative; }
.cmd-app:not(.edition) > .cmd-barre-haut { position: absolute; top: 0; left: 0; right: 0; z-index: 10; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
body.cmd-repos .cmd-barre-haut:not(.edition) { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.cmd-zone { flex: 1; min-height: 0; padding: 12px; }
.cmd-apercu { height: calc(100vh - 150px); min-height: 520px; padding: 0; }
.cmd-grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; height: 100%; }
.cmd-grille.edition { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc((100% + 12px) / 12) calc((100% + 12px) / var(--rangees, 8)); }
.cmd-w { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cmd-w-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 0; font-size: clamp(11px, 1vw, 15px); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmd-w-tete > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-w-per { flex: 0 0 auto; font-size: .82em; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.cmd-w-per.force { background: var(--brand-soft); color: var(--brand); }
.cmd-w-corps { flex: 1; min-height: 0; padding: 8px 12px 12px; container-type: size; overflow: hidden; }
.edition .cmd-w { outline: 1px dashed var(--line-strong); }
.edition .cmd-w-tete { cursor: grab; touch-action: none; }
.cmd-w.actif { outline: 2px solid var(--brand); z-index: 5; opacity: .92; }
.cmd-w-actions { flex: 0 0 auto; }
.cmd-w-actions button { border: 0; background: var(--panel-2); color: var(--ink); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; margin-left: 4px; }
.cmd-poignee { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, var(--brand) 50%); border-bottom-right-radius: 14px; }
.cmd-vide { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--faint); font-size: clamp(12px, 1.1vw, 18px); }
.cmd-kpi, .cmd-objectif { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.cmd-valeur { font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; font-size: clamp(22px, min(16cqw, 42cqh), 150px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-valeur.petit { font-size: clamp(14px, min(8cqw, 11cqh), 44px); text-align: center; }
.cmd-sous { color: var(--muted); font-size: clamp(11px, min(5cqw, 9cqh), 22px); }
.cmd-objectif .cmd-sous { text-align: center; }
.cmd-barre { height: 8px; background: var(--panel-2); border-radius: 8px; overflow: hidden; flex: 1; min-width: 40px; }
.cmd-kpi > .cmd-barre { flex: 0 0 auto; height: clamp(6px, 4cqh, 16px); }
.cmd-barre > i { display: block; height: 100%; background: var(--brand); border-radius: 8px; transition: width .8s; }
.cmd-jauge { flex: 1; min-height: 0; display: flex; justify-content: center; }
.cmd-jauge svg { width: 100%; height: 100%; }
.cmd-jauge .fond, .cmd-jauge .val { fill: none; stroke-width: 12; stroke-linecap: round; }
.cmd-jauge .fond { stroke: var(--panel-2); }
.cmd-jauge .val { stroke: var(--brand); transition: stroke-dasharray 1s; }
.cmd-jauge .val.ok { stroke: #2f9e6b; }
.cmd-jauge .pc { fill: var(--ink); font-size: 26px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.cmd-classement { display: flex; flex-direction: column; gap: clamp(4px, 2cqh, 14px); height: 100%; }
.cmd-rang { display: flex; align-items: center; gap: 10px; font-size: clamp(12px, min(5cqw, 7cqh), 26px); }
.cmd-medaille { width: 1.6em; text-align: center; font-weight: 800; }
.cmd-avatar { width: 2em; height: 2em; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: .8em; flex: 0 0 auto; }
.cmd-rang-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cmd-rang-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-rang-val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmd-flux { display: flex; flex-direction: column; gap: 8px; height: 100%; overflow: hidden; }
.cmd-ev { display: flex; gap: 10px; align-items: flex-start; font-size: clamp(12px, 4.2cqw, 20px); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cmd-ev.nouveau { animation: cmdArrive .8s ease-out; }
.cmd-ev-ic { font-size: 1.3em; line-height: 1.1; }
.cmd-ev-corps { min-width: 0; }
.cmd-ev-corps .cmd-sous { font-size: .8em; }
@keyframes cmdArrive { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.cmd-pipe { display: flex; flex-direction: column; gap: clamp(4px, 2.4cqh, 14px); height: 100%; font-size: clamp(11px, min(4.5cqw, 7cqh), 22px); }
.cmd-pipe-l { display: grid; grid-template-columns: minmax(70px, 42%) 1fr auto; align-items: center; gap: 10px; }
.cmd-pipe-lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-table { display: flex; flex-direction: column; gap: 6px; font-size: clamp(11px, min(4cqw, 7cqh), 20px); }
.cmd-tr { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 6px; font-variant-numeric: tabular-nums; }
.cmd-tr > :not(:first-child) { text-align: right; }
.cmd-th { color: var(--muted); font-size: .8em; }
.cmd-courbe { height: 100%; }
.cmd-courbe .chart { height: 100%; display: flex; flex-direction: column; }
.cmd-courbe .chart > div:last-child { flex: 1; min-height: 0; }
.cmd-courbe svg { width: 100%; height: 100%; }
.cmd-message { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; font-size: clamp(14px, min(7cqw, 45cqh), 64px); }
.cmd-defile { height: 100%; display: flex; align-items: center; overflow: hidden; white-space: nowrap; font-weight: 800; font-size: clamp(14px, 45cqh, 56px); }
.cmd-defile span { display: inline-block; padding-left: 100%; animation: cmdDefile 22s linear infinite; }
@keyframes cmdDefile { to { transform: translateX(-100%); } }
.cmd-son { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; z-index: 50; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.cmd-code { font: 800 44px/1.1 Consolas, 'Cascadia Mono', monospace; letter-spacing: .18em; text-align: center; margin: 8px 0 10px; padding: 16px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); }
.cmd-app-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.cmd-app-code { font: 800 20px/1 Consolas, 'Cascadia Mono', monospace; letter-spacing: .12em; padding: 8px 10px; border-radius: 8px; background: var(--brand-soft); }
.cmd-catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cmd-cat { text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 12px; cursor: pointer; color: var(--ink); font-family: inherit; display: flex; flex-direction: column; gap: 4px; }
.cmd-cat:hover { border-color: var(--brand); }
.cmd-cat span { color: var(--muted); font-size: 12.5px; }
.cmd-fete { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; background: radial-gradient(circle, rgba(246, 0, 0, .35), rgba(0, 0, 0, .88)); overflow: hidden; animation: cmdFeteIn .35s ease-out; }
.cmd-fete.devis { background: radial-gradient(circle, rgba(47, 158, 107, .35), rgba(0, 0, 0, .88)); }
.cmd-fete.sortie { opacity: 0; transition: opacity .6s; }
.cmd-fete-carte { position: relative; z-index: 1; text-align: center; color: #fff; padding: 30px 40px; animation: cmdPop .7s cubic-bezier(.2, 1.6, .4, 1); }
.cmd-fete-ic { font-size: min(22vw, 200px); line-height: 1; animation: cmdSouffle .5s ease-in-out 3 alternate; }
.cmd-fete-titre { font-size: min(7vw, 84px); font-weight: 900; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.cmd-fete-montant { font-size: min(9vw, 110px); font-weight: 900; color: #ffd400; font-variant-numeric: tabular-nums; }
.cmd-fete-client { font-size: min(4vw, 44px); font-weight: 700; margin-top: 6px; }
.cmd-fete-vendeur { font-size: min(3.4vw, 36px); margin-top: 10px; opacity: .9; }
.cmd-confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation-name: cmdTombe; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes cmdTombe { to { top: 110%; transform: rotate(720deg) translateX(40px); } }
@keyframes cmdFeteIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cmdSouffle { from { transform: rotate(-12deg) scale(1); } to { transform: rotate(8deg) scale(1.12); } }
@media (max-width: 800px) {
  .cmd-grille { grid-template-columns: 1fr; grid-template-rows: none !important; height: auto; grid-auto-rows: 180px; }
  .cmd-grille > .cmd-w { grid-column: auto !important; grid-row: auto !important; }
  body.cmd-page { overflow: auto; }
  .cmd-app { height: auto; min-height: 100vh; }
}

/* --- Poste de commandement : menu « Sons et paliers » ------------------------------------------- */
.cmd-sons .form-section { margin-top: 16px; }
.cmd-son-bloc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.cmd-son-tete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cmd-son-tete .check { font-weight: 700; }
.cmd-son-ligne { gap: 8px; align-items: center; flex-wrap: wrap; }
.cmd-son-ligne .input { padding: 5px 8px; }
.cmd-son-liste { display: flex; flex-direction: column; gap: 6px; }
.cmd-son-nom { flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cmd-son-special { border-top: 1px dashed var(--line-strong); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.cmd-son-special:first-of-type { border-top: 0; padding-top: 0; }
.cmd-fete.palier { background: radial-gradient(circle, rgba(255, 212, 0, .35), rgba(0, 0, 0, .9)); }
.cmd-fete.palier .cmd-fete-ic { animation: cmdDanse .45s ease-in-out infinite alternate; }
.cmd-fete-couper { margin-top: 22px; font-size: 16px; padding: 10px 18px; }
@keyframes cmdDanse { from { transform: rotate(-14deg) translateY(0); } to { transform: rotate(14deg) translateY(-12px); } }
select.input.cmd-periode { width: auto; min-width: 200px; flex: 0 0 auto; }
select.input.cmd-periode.force { border-color: var(--brand); color: var(--brand); }
.stats-periodes { flex-wrap: wrap; gap: 6px; }
.stats-dates { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.stats-dates .input { padding: 4px 8px; }
.stats-periode { margin: 4px 2px 10px; font-size: 13.5px; }
.cmd-fete-titre.long { font-size: min(4.4vw, 56px); max-width: 88vw; margin: 0 auto; line-height: 1.15; }

/* --- Aide et support : grande recherche, types de demande -------------------------------------- */
.aide-cherche { position: relative; flex: 1 1 320px; min-width: 0; }
.aide-cherche > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.aide-cherche .aide-recherche { width: 100%; padding-left: 38px; }
.aide-grande .aide-cherche > svg { width: 22px; height: 22px; left: 16px; }
.aide-grande .aide-cherche .aide-recherche { font-size: 16.5px; padding: 14px 16px 14px 48px; border-radius: 12px; border-width: 2px; }
.aide-grande .aide-cherche .aide-recherche:focus { border-color: var(--brand); }
.aide-compte { font-size: 12.5px; color: var(--muted); margin: -4px 2px 8px; min-height: 0; }
.aide-compte:empty { display: none; }
.aide-pas-trouve { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--panel-2); font-size: 13.5px; }
.sup-types { display: flex; gap: 8px; flex-wrap: wrap; }
.sup-type { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel-2); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; }
.sup-type svg { width: 16px; height: 16px; }
.sup-type.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.sup-suggestions { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 6px; font-size: 13px; }
.sup-suggestions:empty { display: none; }
/* --- Organiser le menu : menu personnel « Mon espace » ---------------------------------------- */
.org-liste.org-vide:empty { min-height: 54px; border-color: var(--line-strong); justify-content: center; }
.org-liste.org-vide:empty::before { content: attr(data-vide); text-align: center; }
.org-titre.org-perso .org-nom { color: var(--brand); }
/* ANCHOR:site */
/* --- Site internet (CMS) ------------------------------------------------------------------------ */
.content.se-plein { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
/* import du site en arrière-plan : pastille visible sur tous les écrans */
.tache-fond { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 79; width: min(460px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 10px 14px; }
.tache-fond .tf-haut { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.tache-fond .tf-haut svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--brand); stroke-width: 2; }
.tache-fond .tf-barre { height: 5px; border-radius: 3px; background: var(--panel-2); margin: 8px 0 6px; overflow: hidden; }
.tache-fond .tf-barre-in { height: 100%; width: 0; background: var(--brand); transition: width .4s; }
.tache-fond.ok .tf-barre-in { background: var(--ok); }
.tache-fond.avert .tf-barre-in { background: var(--warn); }
.tache-fond .tf-detail { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tache-fond .tf-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.tache-fond .tf-actions:empty { display: none; }
.se { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.se-barre { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.se-barre .icon-btn { font-size: 17px; }
.se-page-sel { width: auto; min-width: 220px; max-width: 360px; }
.se-devices button { display: inline-flex; align-items: center; padding: 6px 10px; }
.se-devices svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.se-etat { margin-left: auto; }
.se-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr) 330px; grid-template-rows: minmax(0, 1fr); }   /* rangée bornée : les volets défilent au lieu de dépasser l'écran */
.se-gauche, .se-droite { background: var(--panel); overflow: auto; padding: 12px; min-height: 0; }
.se-gauche { border-right: 1px solid var(--line); }
.se-droite { border-left: 1px solid var(--line); }
.se-seg { display: flex; width: 100%; margin-bottom: 10px; }
.se-seg button { flex: 1; padding: 6px 4px; }
.se-vide { padding: 14px 4px; font-size: 13px; }
.se-ligne { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.se-ligne:hover { background: var(--panel-2); }
.se-ligne.on { background: var(--brand-soft); border-color: var(--line-strong); }
.se-ligne-txt { flex: 1; min-width: 0; }
.se-ligne-txt > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-calque { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); margin-bottom: 5px; background: var(--panel); font-size: 13px; }
.se-calque:hover { border-color: var(--line-strong); }
.se-calque.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.se-calque.glisse { opacity: .4; }
.se-calque.dessus { border-top: 3px solid var(--brand); }
.se-calque-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-2); font-size: 13px; flex: none; }
.se-ajout-global { width: 100%; border: 1px dashed var(--line-strong); background: none; border-radius: 8px; padding: 7px; color: var(--muted); cursor: pointer; margin-bottom: 5px; }
.se-biblio { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.se-bloc-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; font-size: 12px; color: var(--ink); }
.se-bloc-type:hover { border-color: var(--brand); }
.se-bloc-type span { font-size: 16px; }
.se-scene { background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--bg) 0 50%) 0 0 / 24px 24px; overflow: auto; display: flex; justify-content: center; padding: 16px; min-height: 0; min-width: 0; }
.se-scene-page { width: 100%; height: 100%; transition: width .25s; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.18); border-radius: 6px; overflow: hidden; }
.se-scene[data-device="tablette"] .se-scene-page { width: 820px; flex: none; }
.se-scene[data-device="telephone"] .se-scene-page { width: 390px; flex: none; border-radius: 22px; }
.se-cadre { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.se-insp-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.se-insp-actions { margin-left: auto; display: flex; gap: 2px; }
.se-insp-actions .icon-btn { font-size: 15px; }
.se-insp .field { margin-bottom: 10px; }
.se-champ label { font-size: 12px; }
.se-groupe { display: grid; gap: 6px; }
.se-code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
.se-coche { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 6px 0 10px; cursor: pointer; }
.se-coche input { margin-top: 3px; }
.se-ia-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.se-ia-mini button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 2px 9px; font-size: 11px; cursor: pointer; color: var(--muted); }
.se-ia-mini button:hover { color: var(--ink); border-color: var(--brand); }
.se-liste > label { display: block; margin-bottom: 4px; }
.se-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--panel); }
.se-item > summary { display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer; font-size: 13px; list-style: none; }
.se-item > summary > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-item-act { display: flex; }
.se-item-act .icon-btn { padding: 2px 4px; }
.se-item-corps { padding: 4px 8px 8px; border-top: 1px solid var(--line); }
.se-img { display: grid; gap: 6px; }
.se-img-apercu { height: 110px; border: 1px dashed var(--line-strong); border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: var(--panel-2); }
.se-img-apercu img { max-width: 100%; max-height: 100%; object-fit: contain; }
.se-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.se-medias.petit { grid-template-columns: 1fr 1fr; max-height: none; margin-top: 10px; gap: 6px; }
.se-media { position: relative; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--panel); cursor: pointer; text-align: left; color: var(--ink); }
.se-media:hover { border-color: var(--brand); }
.se-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: var(--panel-2); }
.se-media span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-media .icon-btn { position: absolute; top: 8px; right: 8px; background: var(--panel); }
.se-google { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel-2); font-family: arial, sans-serif; }
.se-google-url { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-google-titre { color: #8ab4f8; font-size: 16px; margin: 2px 0; }
body[data-theme="light"] .se-google-titre { color: #1a0dab; }
.se-google-desc { font-size: 13px; color: var(--muted); }
.modal.xlarge { width: min(1400px, 100%); }
.se-apercu { display: flex; flex-direction: column; gap: 10px; height: 72vh; }
.se-apercu-zone { flex: 1; display: flex; justify-content: center; background: var(--panel-2); border-radius: 8px; overflow: hidden; }
.se-apercu-cadre { width: 100%; height: 100%; border: 0; background: #fff; transition: width .25s; }
.se-version { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.se-version-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.se-version-tete .input { max-width: 260px; }
.se-couleurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.se-couleur { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.se-couleur input { width: 38px; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; }
.se-import-liste { max-height: 46vh; overflow: auto; }
.se-import-liste .input { min-width: 140px; }
.se-accueil { margin: auto; max-width: 620px; text-align: center; padding: 40px 20px; }
.se-accueil-ic svg { width: 56px; height: 56px; fill: none; stroke: var(--brand); stroke-width: 1.5; }
@media (max-width: 1200px) { .se-corps { grid-template-columns: 230px 1fr 290px; } }
@media (max-width: 980px) { .content.se-plein { overflow: auto; } .se, .se-corps { flex: none; } .se-corps { grid-template-columns: 1fr; grid-template-rows: auto minmax(420px, 70vh) auto; } .se-gauche, .se-droite { border: 0; border-bottom: 1px solid var(--line); max-height: 320px; } }
/* ANCHOR:boutique */
.bq-catalogue { max-height: 56vh; overflow: auto; display: grid; gap: 6px; }.bq-cat-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }.bq-cat-ligne:hover { border-color: var(--line-strong); }
/* Boutique en ligne : vignettes, éditeur de produit (images, déclinaisons), fiche commande, réglages */
.bq-vig { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; font-size: 18px; color: var(--faint); flex: none; }
.bq-vig img { width: 100%; height: 100%; object-fit: cover; }
.bq-vig.grande { width: 96px; height: 96px; font-size: 30px; border-radius: 10px; }
.bq-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.bq-img { position: relative; }
.bq-img-act { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.bq-img-act .icon-btn { background: var(--panel); padding: 3px; box-shadow: var(--shadow); }
.bq-img-ajout { width: 96px; height: 96px; border: 2px dashed var(--line-strong); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; }
.bq-img-ajout:hover { border-color: var(--brand); color: var(--ink); }
.bq-img-ajout svg { width: 20px; height: 20px; }
.bq-desc-ed .rte-page { min-height: 160px; max-height: 340px; margin: 8px; padding: 14px 18px; }
.bq-desc-ed { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.bq-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bq-option { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; align-items: center; }
.bq-options > .btn { align-self: flex-start; }
.bq-var { max-height: 360px; }
.bq-var .input { min-height: 30px; padding: 4px 8px; min-width: 80px; }
.bq-infos { display: flex; flex-direction: column; gap: 8px; }
.bq-info { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 13px; }
.bq-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; max-width: 360px; margin: 14px 0 0 auto; font-size: 13px; }
.bq-tot dt { color: var(--muted); }
.bq-tot dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bq-tot .bq-tot-total { font-weight: 700; font-size: 15px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 6px; }
.bq-histo { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.bq-evt { display: grid; grid-template-columns: 118px 1fr auto; gap: 10px; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.bq-zone { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin-bottom: 10px; background: var(--panel-2); }
.bq-zone .tbl .input { min-height: 30px; padding: 4px 8px; }
.bq-etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.bq-aide { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
@media (max-width: 1100px) { .bq-option { grid-template-columns: 1fr; } .bq-evt { grid-template-columns: 1fr; } }
/* ANCHOR:bot */
/* Assistant du site (bot) : réglages, base de connaissances, test, conversations */
.bot-reglages > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bot-reglages .card .field { margin-top: 8px; }
.bot-version { border-style: dashed; }
.bot-barre { gap: 8px; margin-top: 14px; position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); }
.bot-import { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.bot-import input { margin-top: 3px; }
.bot-prop { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bot-testeur { padding: 0; overflow: hidden; }
.bot-chat { display: flex; flex-direction: column; gap: 8px; padding: 14px; min-height: 320px; max-height: 58vh; overflow-y: auto; background: var(--panel-2); }
.bot-transcript { max-height: 60vh; border-radius: var(--radius-s); }
.bot-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bot-msg p { margin: 0 0 6px; } .bot-msg p:last-child { margin: 0; } .bot-msg ul, .bot-msg ol { margin: 4px 0; padding-left: 20px; }
.bot-msg.b { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bot-msg.u { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bot-msg.err { border-color: var(--bad); background: var(--bad-soft); }
.bot-msg a { color: var(--info); }
.bot-meta { margin-top: 6px; font-size: 11px; color: var(--faint); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bot-msg.u .bot-meta { color: rgba(255, 255, 255, .8); }
.bot-lien { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.bot-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot-chip { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.bot-chip:hover { border-color: var(--brand); }
.bot-frappe { display: flex; gap: 4px; padding: 12px 14px; }
.bot-frappe i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: bot-p 1.2s infinite ease-in-out; }
.bot-frappe i:nth-child(2) { animation-delay: .2s; } .bot-frappe i:nth-child(3) { animation-delay: .4s; }
@keyframes bot-p { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.bot-saisie { gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; flex-wrap: nowrap; }
.bot-saisie textarea { flex: 1; resize: vertical; min-height: 44px; }
.bot-extraits { margin: 6px 0 0; padding-left: 20px; } .bot-extraits li { margin-bottom: 8px; }
.bot-pre { white-space: pre-wrap; font-size: 12px; max-height: 45vh; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px; }
/* ANCHOR:demandes */
.dmd-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dmd-kpi-retard { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.dmd-kpi-retard .kpi-value { color: var(--bad); }
.dmd-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.dmd-tete .spacer { flex: 1; }
.dmd-resp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dmd-resp .input { width: auto; min-width: 150px; padding-top: 5px; padding-bottom: 5px; }
.dmd-actions { gap: 6px; margin-bottom: 12px; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); }
.dmd-dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.dmd-dl dt { color: var(--muted); }
.dmd-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dmd-message { white-space: pre-wrap; background: var(--panel-2); border-radius: var(--radius-s); padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.dmd-pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.dmd-pieces svg { width: 14px; height: 14px; }
.dmd-tl { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; }
.dmd-tl-i { border-left: 2px solid var(--line-strong); padding-left: 10px; font-size: 13px; }
.dmd-tl-i .faint { font-size: 11px; }
.dmd-modele { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.dmd-modele + .dmd-modele { margin-top: 8px; }
.dmd-modele summary { cursor: pointer; font-weight: 600; }
.dmd-fiche .card + .card, .dmd-fiche .grid + .card, .dmd-fiche .card + .grid { margin-top: 12px; }
@media (max-width: 1100px) { .dmd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dmd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dmd-dl { grid-template-columns: 1fr; } .dmd-fiche .grid.g2 { grid-template-columns: 1fr; } }
/* ANCHOR:salles */
/* --- Salles et placement (js/salles.js) : plan 2D, vue 3D en CSS, placement, émargement --- */
body {
  --sl-floor: #2b3037; --sl-floor-2: rgba(255, 255, 255, .025); --sl-grid: rgba(255, 255, 255, .06); --sl-grid-2: rgba(255, 255, 255, .03); --sl-wall: #58606c;
  --sl-desk: #b8946a; --sl-trainer: #8a6a48; --sl-chair: #3d4550; --sl-board: #eef1f4; --sl-screen: #0e1218; --sl-door: #a8743f;
  --sl-glass: rgba(125, 195, 245, .5); --sl-car0: #c9342b; --sl-car1: #2f6fc0; --sl-car2: #8d949c; --sl-car3: #e3e3e3; --sl-carglass: #1c2835;
  --sl-tyre: #111317; --sl-lift: #e6a817; --sl-bench: #6f7a86; --sl-benchtop: #9a6a38; --sl-diag: #2a64b0; --sl-cab: #7d8794; --sl-proj: #d9dde3;
  --sl-aisle: rgba(240, 190, 60, .18); --sl-ink: rgba(255, 255, 255, .74); --sl-bg: radial-gradient(ellipse at 50% 30%, #20252c, #111316 78%);
  --sl-signe: var(--ok); --sl-retard: var(--warn); --sl-absent: var(--bad); --sl-attente: #6b7380; --sl-place: #4f7fd6; --sl-libre: var(--panel-3);
}
body[data-theme="light"] {
  --sl-floor: #e9e3d7; --sl-floor-2: rgba(0, 0, 0, .03); --sl-grid: rgba(0, 0, 0, .08); --sl-grid-2: rgba(0, 0, 0, .035); --sl-wall: #aab2bd;
  --sl-desk: #dcbd8e; --sl-trainer: #b08a5c; --sl-chair: #4a5462; --sl-board: #ffffff; --sl-screen: #18202b; --sl-door: #b98552;
  --sl-glass: rgba(90, 170, 230, .45); --sl-car3: #f4f4f4; --sl-bench: #8a95a1; --sl-cab: #a3adb9; --sl-proj: #eceff3;
  --sl-aisle: rgba(230, 170, 20, .2); --sl-ink: rgba(16, 18, 22, .72); --sl-bg: radial-gradient(ellipse at 50% 30%, #ffffff, #e3e7ec 78%);
  --sl-attente: #9aa2ad; --sl-place: #2f6fd0;
}
.sl-scene { position: relative; }
.sl-view { position: relative; height: 480px; overflow: hidden; border-radius: 10px; background: var(--sl-bg); border: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.sl-3d .sl-view { touch-action: none; cursor: grab; }
.sl-moving .sl-view { cursor: grabbing; }
.sl-cam { position: absolute; left: 50%; top: 50%; width: 0; height: 0; perspective: 1700px; }
.sl-2d .sl-cam { perspective: none; }
.sl-floor { position: absolute; left: 0; top: 0; transform-style: preserve-3d;
  transform: translate(-50%, -50%) scale3d(var(--zm, 1), var(--zm, 1), var(--zm, 1)) rotateX(var(--rx, 0deg)) rotateZ(var(--rz, 0deg)); }
.sl-ready .sl-floor { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.sl-moving .sl-floor { transition: none; }
.sl-shape { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.sl-ground { position: absolute; inset: 0; background-color: var(--sl-floor);
  background-image: linear-gradient(var(--sl-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sl-grid) 1px, transparent 1px), repeating-conic-gradient(var(--sl-floor-2) 0 25%, transparent 0 50%);
  background-size: 80px 80px, 80px 80px, 160px 160px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
/* éditeur : grille au pas de la salle (0,10 / 0,25 / 0,50 m, variable --sl-g) + repères tous les mètres, en fond CSS */
.sl-edit.sl-2d .sl-ground {
  background-image: linear-gradient(var(--sl-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sl-grid) 1px, transparent 1px),
    linear-gradient(var(--sl-grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--sl-grid-2) 1px, transparent 1px), repeating-conic-gradient(var(--sl-floor-2) 0 25%, transparent 0 50%);
  background-size: 80px 80px, 80px 80px, var(--sl-g, 40px) var(--sl-g, 40px), var(--sl-g, 40px) var(--sl-g, 40px), 160px 160px; }
.sl-wall { position: absolute; width: 0; height: 0; transform-origin: 0 0; transform-style: preserve-3d; }
.sl-corner { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--panel); border: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); cursor: move; pointer-events: auto; touch-action: none; transform: translateZ(30px); }
.sl-corner.on { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 1px 4px rgba(0, 0, 0, .4); }
.sl-el.sl-out { outline: 2px dashed var(--bad); outline-offset: 1px; }
.sl-shapebox { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 4px 0 10px; }
.sl-shapebox .field { margin: 8px 0 0; }
input.input.sl-mval { width: 72px; text-align: right; padding-left: 6px; padding-right: 6px; }
.sl-step .faint { min-width: 0; }
.sl-tpl-h { margin: 18px 0 10px; font-size: 14px; }
.sl-tpl-acts { margin-top: 4px; }
.sl-el, .sl-b, .sl-seat, .sl-bill { position: absolute; transform-style: preserve-3d; }
.sl-f { position: absolute; left: 0; top: 0; transform-origin: 0 0; background-color: var(--c, #888); }
.sl-t { background-image: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.sl-s { background-image: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)); }
.sl-e { background-image: linear-gradient(rgba(0, 0, 0, .24), rgba(0, 0, 0, .24)); }
.sl-w { background-image: linear-gradient(rgba(0, 0, 0, .17), rgba(0, 0, 0, .17)); }
.sl-n { background-image: linear-gradient(rgba(0, 0, 0, .32), rgba(0, 0, 0, .32)); }
.sl-2d .sl-n, .sl-2d .sl-s, .sl-2d .sl-e, .sl-2d .sl-w, .sl-2d .sl-back, .sl-2d .sl-shadow { display: none; }
.sl-shadow { position: absolute; border-radius: 6px; background: rgba(0, 0, 0, .2); box-shadow: 0 0 12px 5px rgba(0, 0, 0, .16); transform: translate(5px, 6px); }
.sl-plate { position: absolute; inset: 2px; border-radius: 4px; background: var(--c); opacity: .4; }
.sl-3d .sl-plate { opacity: .22; }
.sl-plate.sl-m-aisle { opacity: 1; background: repeating-linear-gradient(45deg, var(--sl-aisle) 0 10px, transparent 10px 20px); border: 2px dashed rgba(230, 170, 30, .55); }
.sl-plate.sl-hazard { opacity: 1; border-radius: 3px; background: repeating-linear-gradient(45deg, rgba(230, 168, 23, .55) 0 10px, rgba(0, 0, 0, .3) 10px 20px); }
.sl-lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; font-weight: 600; line-height: 1.1; color: var(--sl-ink); pointer-events: none; padding: 2px; overflow: hidden; }
.sl-k-banc .sl-lbl, .sl-k-vehicule .sl-lbl { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.sl-k-poste2 .sl-lbl, .sl-k-poste .sl-lbl, .sl-k-formateur .sl-lbl, .sl-k-etabli .sl-lbl { color: rgba(30, 24, 16, .8); }
.sl-lap { position: absolute; background: #20252c; box-shadow: inset 0 0 0 2px #5d6570; border-radius: 2px; }
.sl-lens { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #3a6fd8; box-shadow: 0 0 6px #7fb0ff; }
.sl-m-desk { --c: var(--sl-desk); } .sl-m-trainer { --c: var(--sl-trainer); } .sl-m-chair { --c: var(--sl-chair); } .sl-m-board { --c: var(--sl-board); }
.sl-m-screen { --c: var(--sl-screen); } .sl-m-door { --c: var(--sl-door); } .sl-m-glass { --c: var(--sl-glass); } .sl-m-wall { --c: var(--sl-wall); }
.sl-m-car0 { --c: var(--sl-car0); } .sl-m-car1 { --c: var(--sl-car1); } .sl-m-car2 { --c: var(--sl-car2); } .sl-m-car3 { --c: var(--sl-car3); }
.sl-m-carglass { --c: var(--sl-carglass); } .sl-m-tyre { --c: var(--sl-tyre); } .sl-m-lift { --c: var(--sl-lift); } .sl-m-bench { --c: var(--sl-bench); }
.sl-m-benchtop { --c: var(--sl-benchtop); } .sl-m-diag { --c: var(--sl-diag); } .sl-m-cab { --c: var(--sl-cab); } .sl-m-proj { --c: var(--sl-proj); } .sl-m-aisle { --c: var(--sl-aisle); }
.sl-m-board .sl-n, .sl-m-board .sl-s, .sl-m-board .sl-e, .sl-m-board .sl-w { background-image: none; box-shadow: inset 0 0 0 3px #8e98a4; }
.sl-m-screen .sl-n, .sl-m-screen .sl-s { background-image: linear-gradient(160deg, rgba(90, 160, 255, .5), rgba(20, 40, 80, .1) 60%); box-shadow: inset 0 0 0 2px #333b46; }
.sl-m-carglass .sl-t { background-image: linear-gradient(135deg, rgba(160, 200, 240, .35), rgba(255, 255, 255, 0) 60%); }
/* places : chaise (dossier du côté opposé au regard), poste debout, zone de dépôt */
.sl-seat { left: 0; top: 0; width: 0; height: 0; }
.sl-hit { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 9px; }
.sl-clk .sl-seat, .sl-seat.sl-grab { cursor: pointer; }
.sl-picking .sl-seat:not(.sl-occ):not(.sl-trainer) .sl-hit { background: rgba(79, 127, 214, .22); box-shadow: 0 0 0 2px var(--sl-place); }
.sl-seat.sl-over .sl-hit { background: rgba(47, 191, 143, .35); box-shadow: 0 0 0 2px var(--ok); }
.sl-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .88); pointer-events: none; }
.sl-spot { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--sl-ink); background: rgba(127, 127, 127, .14); }
.sl-spot .sl-num { color: var(--sl-ink); }
.sl-bk-0 > .sl-t { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .2); }
.sl-bk-180 > .sl-t { box-shadow: inset 0 5px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .2); }
.sl-bk-90 > .sl-t { box-shadow: inset 5px 0 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .2); }
.sl-bk-270 > .sl-t { box-shadow: inset -5px 0 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .2); }
/* étiquettes au-dessus des places, toujours face à l'écran (rotations inverses de celles du sol) */
.sl-bill { left: 0; top: 0; width: 0; height: 0; pointer-events: none;
  transform: translateZ(var(--bz, 44px)) rotateZ(calc(var(--rz, 0deg) * -1)) rotateX(calc(var(--rx, 0deg) * -1)) scale(var(--tz, 1)); }
.sl-tag { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; pointer-events: auto; }
.sl-3d .sl-tag::after { content: ""; width: 2px; height: 12px; border-radius: 2px; background: var(--sl-ink); opacity: .55; }
.sl-2d .sl-tag { bottom: auto; top: 0; transform: translate(-50%, -30%); gap: 1px; }
.sl-av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 700; font-size: 11px; color: #fff; background: var(--sl-attente); box-shadow: 0 0 0 2px var(--panel), 0 2px 6px rgba(0, 0, 0, .35); text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.sl-nm { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.sl-2d .sl-nm { font-size: 9.5px; padding: 0 4px; max-width: 76px; }
.sl-2d .sl-av { width: 22px; height: 22px; font-size: 10px; }
.sl-tiny .sl-nm { display: none; }
.sl-tag-tr .sl-av { border-radius: 7px; }
.sl-grab .sl-tag { cursor: grab; }
/* barre d'outils de la vue */
.sl-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; z-index: 2; }
.sl-tools .seg { background: var(--panel); }
.sl-seg:empty { display: none; }
.sl-tb { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sl-tb:hover { border-color: var(--faint); }
.sl-2d .sl-3donly { display: none; }
.sl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); align-items: center; }
.sl-lg i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.sl-unplaced { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.sl-hintline { margin-top: 8px; }
/* glisser-déposer */
.sl-ghost { position: fixed; z-index: 10000; pointer-events: none; transform: translate(-50%, -50%) rotate(-3deg); opacity: .94; box-shadow: var(--shadow); margin: 0; }
body.sl-dragging, body.sl-dragging * { cursor: grabbing !important; }
/* éditeur de salle */
.sl-editor { display: grid; grid-template-columns: 190px minmax(0, 1fr) 260px; gap: 14px; align-items: start; outline: none; }
.sl-editor .card + .card { margin-top: 0; }
.sl-edplan, .sl-placeplan { min-width: 0; }
.sl-pal, .sl-props { padding: 12px; }
.sl-pal-t { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 2px 2px 8px; }
.sl-palb { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: grab; text-align: left; font-size: 13px; touch-action: none; }
.sl-palb:hover { background: var(--panel-2); border-color: var(--line); }
.sl-palb:disabled { cursor: default; opacity: .6; }
.sl-sw { display: inline-block; width: 18px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); flex: none; vertical-align: -2px; }
.sl-props h4 { margin: 0 0 12px; font-size: 15px; }
.sl-props .field { margin-bottom: 10px; }
.sl-step { display: flex; align-items: center; gap: 6px; }
.sl-step span { min-width: 54px; text-align: center; font-weight: 600; }
.sl-capbox { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.sl-cap { font-size: 30px; font-weight: 700; line-height: 1; color: var(--brand-text); }
.sl-rs { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 4px; background: var(--brand); border: 2px solid #fff; cursor: nwse-resize; touch-action: none; }
.sl-3d .sl-rs { display: none; }
.sl-edit.sl-2d .sl-el { cursor: move; touch-action: none; }
.sl-el.sl-sel { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.sl-status { font-size: 12px; align-self: center; }
/* plan de placement */
.sl-place { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.sl-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 10px; }
.sl-roombar { display: inline-flex; align-items: center; gap: 8px; }
select.input.sl-roomsel { width: auto; min-width: 220px; max-width: 100%; }
.sl-warn { color: var(--warn); font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.sl-side { padding: 12px; max-height: 660px; overflow: auto; }
.sl-side.sl-over { box-shadow: inset 0 0 0 2px var(--sl-place); }
.sl-side-h { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 8px; font-size: 13px; }
.sl-chip + .sl-side-h, .sl-side-empty + .sl-side-h { margin-top: 16px; }
.sl-side-empty { font-size: 12.5px; margin: 0 2px 6px; }
.sl-chip { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); margin-bottom: 6px; user-select: none; text-align: left; color: var(--ink); font-size: 13px; }
button.sl-chip { cursor: pointer; }
.sl-chip.sl-grab { cursor: grab; touch-action: none; }
.sl-chip.on { border-color: var(--sl-place); box-shadow: 0 0 0 2px rgba(79, 127, 214, .35); }
.sl-ghost.sl-chip { width: auto; max-width: 260px; }
.sl-chip-m { flex: 1; min-width: 0; }
.sl-chip-n { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-chip-s { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-chip-seat { font-weight: 700; font-size: 12px; color: var(--muted); }
.sl-pick { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; }
@media (pointer: coarse) { .sl-chip.sl-grab { touch-action: pan-y; } }
/* listes, vignettes, modèles */
.sl-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sl-rooms .card + .card { margin-top: 0; }
.sl-room { display: flex; flex-direction: column; gap: 10px; }
.sl-room h3 { margin: 0 0 2px; font-size: 15px; }
.sl-room-n strong { font-size: 18px; }
.sl-room-notes { font-size: 12px; white-space: pre-wrap; max-height: 3.6em; overflow: hidden; }
.sl-thumb { border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); padding: 6px; cursor: pointer; line-height: 0; }
.sl-thumb:hover { border-color: var(--line-strong); }
.sl-thumb svg { width: 100%; height: auto; max-height: 190px; display: block; }
.sl-cardbody { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sl-cardbody .sl-thumb { width: 230px; flex: none; }
.sl-cardinfo { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.sl-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.sl-tpl { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; color: var(--ink); }
.sl-tpl:hover { border-color: var(--brand); }
.sl-tpl .sl-thumb { cursor: inherit; }
.sl-auto { display: grid; gap: 8px; }
.sl-autob { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; color: var(--ink); }
.sl-autob:hover { border-color: var(--brand); }
.sl-print-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
@media (max-width: 1150px) { .sl-editor { grid-template-columns: 170px minmax(0, 1fr); } .sl-props { grid-column: 1 / -1; } }
@media (max-width: 900px) { .sl-place { grid-template-columns: 1fr; } .sl-side { max-height: none; } }
@media (max-width: 720px) {
  .sl-editor { grid-template-columns: 1fr; }
  .sl-pal { display: flex; flex-wrap: wrap; gap: 4px; } .sl-pal-t { width: 100%; } .sl-palb { width: auto; }
  .sl-cardbody .sl-thumb { width: 100%; }
  .sl-tools { top: 6px; right: 6px; }
}
/* ANCHOR:annulations */
.ann-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ann-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .ann-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ann-fiche .grid.g2 { grid-template-columns: 1fr; } }
.ann-kpi-retard { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.ann-kpi-retard .kpi-value { color: var(--bad); }
.ann-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.ann-tete .spacer { flex: 1; }
.ann-resp { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ann-resp .input { width: auto; min-width: 150px; }
.ann-actions { gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ann-dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.ann-dl dt { color: var(--muted); }
.ann-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ann-message { white-space: pre-wrap; background: var(--panel-2); border-radius: var(--radius-s); padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.ann-fiche .card { margin-bottom: 12px; }
.ann-just { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ann-just:last-child { border-bottom: 0; }
.ann-calc th { font-weight: 500; color: var(--muted); width: 55%; }
.ann-calc td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ann-detail { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.ann-detail li { margin: 2px 0; }
.ann-recap { margin-top: 10px; }
.ann-cases { display: flex; flex-direction: column; gap: 6px; }
.ann-av { background: var(--panel-2); border-radius: var(--radius-s); padding: 8px 10px; font-size: 13px; }
.ann-tl { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; }
.ann-tl-i { border-left: 2px solid var(--line-strong); padding-left: 10px; font-size: 13px; }
.ann-liens { display: flex; flex-direction: column; gap: 6px; }
.ann-lien { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 8px; border-radius: var(--radius-s); cursor: pointer; }
.ann-lien:hover { background: var(--panel-2); }
.ann-bloc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); }
.ann-bloc .ann-lien { flex-basis: 100%; }
.ann-paliers td { vertical-align: middle; white-space: nowrap; }
.ann-paliers .input { width: 80px; display: inline-block; margin: 0 4px; }
.ann-modele { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin-bottom: 8px; }
.ann-modele summary { cursor: pointer; font-weight: 600; }
.ann-eleve .card { margin-bottom: 16px; }
.ann-eleve-l { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ann-eleve-l:last-child { border-bottom: 0; }
.ann-eleve-kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
@media (max-width: 700px) { .ann-dl { grid-template-columns: 1fr; } .ann-dl dt { margin-top: 6px; } }
/* ANCHOR:planning */
/* Planning des formateurs (js/planning-formateurs.js) */
.pf-tabs { margin-bottom: 14px; overflow-x: auto; }
.pf-tabs .seg { flex-wrap: nowrap; }
.pf-tabs .seg button { white-space: nowrap; }
.pf-scope { margin-bottom: 12px; }
.pf-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pf-bar .input.pf-filter { width: auto; min-width: 130px; max-width: 220px; padding: 6px 8px; }
.pf-period { font-weight: 700; min-width: 170px; text-align: center; }
.pf-week { table-layout: fixed; min-width: 900px; }
.pf-week th.pf-who { width: 170px; }
.pf-week th.pf-we, .pf-week td.pf-we { width: 90px; }
.pf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 0 0 10px; align-items: center; }
.pf-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; background: var(--panel-3); }
.pf-legend i.pf-ouvert { background: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad); }
.pf-legend i.pf-positionne { background: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn); }
.pf-legend i.pf-confirme { background: var(--info-soft); box-shadow: inset 3px 0 0 var(--info); }
.pf-legend i.pf-realise { background: var(--ok-soft); box-shadow: inset 3px 0 0 var(--ok); }
.pf-legend i.pf-annule { opacity: .5; }
.pf-legend i.pf-conflit-l { background: none; box-shadow: inset 0 0 0 2px var(--bad); }
.pf-grid-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); max-height: calc(100vh - 300px); min-height: 180px; }
table.pf-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.pf-grid th, .pf-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; padding: 4px; }
.pf-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.pf-grid .pf-who { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 160px; max-width: 200px; text-align: left; }
.pf-grid thead .pf-who { z-index: 3; background: var(--panel-2); }
.pf-grid th.pf-who[draggable="true"] { cursor: grab; }
.pf-who-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-who-sub { font-size: 11px; color: var(--faint); margin-top: 2px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pf-row-open .pf-who-name { color: var(--bad); }
.pf-row-open td { background: color-mix(in srgb, var(--bad-soft) 35%, transparent); }
.pf-week td.pf-cell { min-width: 118px; height: 56px; }
.pf-month td.pf-cell { min-width: 40px; height: 44px; padding: 2px; }
.pf-month thead th { padding: 3px 2px; font-size: 11px; }
.pf-grid .pf-we { background: var(--panel-2); }
.pf-grid thead th.pf-today { color: var(--brand-text); box-shadow: inset 0 -2px 0 var(--brand); }
.pf-grid td.pf-today { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.pf-over { outline: 2px dashed var(--brand); outline-offset: -2px; }
.pf-chip { display: block; margin: 0 0 3px; padding: 3px 6px; border-radius: 5px; font-size: 11px; line-height: 1.3; cursor: pointer; background: var(--panel-3); color: var(--ink);
  border-left: 3px solid var(--line-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: none; }
.pf-chip:hover { filter: brightness(1.08); }
.pf-chip[draggable="true"] { cursor: grab; }
.pf-chip.pf-ouvert { background: var(--bad-soft); border-left-color: var(--bad); }
.pf-chip.pf-positionne { background: var(--warn-soft); border-left-color: var(--warn); }
.pf-chip.pf-confirme { background: var(--info-soft); border-left-color: var(--info); }
.pf-chip.pf-realise { background: var(--ok-soft); border-left-color: var(--ok); }
.pf-chip.pf-annule { opacity: .5; text-decoration: line-through; }
.pf-chip.pf-autre { font-style: italic; }
.pf-chip.pf-conflit { box-shadow: inset 0 0 0 1px var(--bad); }
.pf-chip.pf-lock { border-left-style: double; border-left-width: 4px; }
.pf-month .pf-chip { padding: 2px 3px; font-size: 10px; }
.pf-cal .cal-d { min-height: 96px; }
.pf-cal .pf-chip { margin: 0; }
.pf-kpis { margin-bottom: 14px; }
.pf-warn { color: var(--bad); font-size: 12px; margin-top: 4px; }
.pf-cands { display: flex; flex-direction: column; gap: 6px; }
.pf-cand { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.pf-slots { display: flex; flex-direction: column; gap: 8px; }
.pf-slot { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-s); background: var(--panel-2); flex-wrap: wrap; }
.pf-slot.pf-ouvert { border-left-color: var(--bad); }
.pf-slot.pf-positionne { border-left-color: var(--warn); }
.pf-slot.pf-confirme { border-left-color: var(--info); }
.pf-slot.pf-realise { border-left-color: var(--ok); }
.pf-slot.pf-annule { opacity: .6; }
.pf-slot-when { min-width: 120px; font-weight: 700; }
.pf-slot-when span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pf-slot-main { flex: 1; min-width: 180px; }
.pf-slot-act { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-day-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 0; }
.pf-day-h:first-child { margin-top: 0; }
.pf-comp { max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.pf-print-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 760px) {
  .pf-grid-wrap { max-height: none; }
  .pf-bar .input.pf-filter { min-width: 0; max-width: none; flex: 1 1 140px; }
  .pf-period { min-width: 0; flex: 1; }
  .pf-slot { gap: 8px; }
  .pf-slot-when { min-width: 0; width: 100%; }
  .pf-slot-act { width: 100%; }
}
/* ANCHOR:bpf */
/* Bilan pédagogique et financier — déclaration cerfa 10443*17 (js/views/bpf.js) */
.input.bpf-ex { width: auto; min-width: 150px; }
.bpf-bandeau { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 12px; }
.bpf-onglets { margin-bottom: 16px; flex-wrap: wrap; }
.bpf-papier { display: flex; flex-direction: column; gap: 18px; max-width: 1060px; }
.bpf-page { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 18px 20px; box-shadow: var(--shadow); }
.bpf-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.bpf-t1 { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.bpf-t2 { font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.bpf-art { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.bpf-cerfa { text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bpf-cerfa b { font-size: 15px; }
.bpf-cerfa span { border: 2px solid var(--ink); padding: 1px 8px; font-weight: 800; font-size: 13px; }
.bpf-transm { font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; margin: 10px 0 12px; }
.bpf-cadre { border: 1px solid var(--line-strong); border-radius: 6px; margin-bottom: 12px; overflow: hidden; }
.bpf-ctitre { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-bottom: 1px solid var(--line-strong); padding: 6px 10px; }
.bpf-ctitre h3 { margin: 0; font-size: 13px; font-weight: 800; flex: 1; letter-spacing: .01em; }
.bpf-texte { font-size: 12px; color: var(--muted); padding: 6px 12px 0; }
.bpf-texte:last-child { padding-bottom: 8px; }
.bpf-ligne { font-size: 13px; padding: 8px 12px; }
.bpf-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 10px 12px; }
.bpf-ch { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bpf-ch.large { grid-column: 1 / -1; padding: 0 12px 10px; }
.bpf-champs .bpf-ch.large { padding: 0; }
.bpf-ch > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.input.bpf-champ { padding: 5px 8px; }
.input.bpf-champ[readonly] { background: transparent; }
.bpf-ouinon { display: inline-flex; gap: 18px; }
.bpf-form { width: 100%; border-collapse: collapse; font-size: 13px; }
.bpf-form th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 8px; text-align: center; vertical-align: bottom; border-bottom: 1px solid var(--line); }
.bpf-form th.lib { text-align: left; }
.bpf-form td { padding: 4px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bpf-form td.lib { min-width: 240px; }
.bpf-form td.code, .bpf-form th.code { width: 36px; text-align: right; font-weight: 800; white-space: nowrap; }
.bpf-form td.col, .bpf-form th.col { width: 170px; }
.bpf-form td.col.petit, .bpf-form th.col.petit { width: 110px; }
.bpf-form tr.titre td { font-style: italic; color: var(--muted); padding-top: 8px; border-bottom: 0; }
.bpf-form tr.ind td.lib { padding-left: 26px; }
.bpf-form tr.dont td.lib { padding-left: 30px; color: var(--muted); }
.bpf-form tr.sous td.lib, .bpf-form tr.tot td.lib { font-weight: 700; }
.bpf-form tr.tot td { border-top: 2px solid var(--line-strong); }
.bpf-case { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bpf-case.large { width: 100%; }
.bpf-boite { width: 118px; flex: none; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; padding: 4px 7px; border: 1.5px solid var(--line-strong); border-radius: 4px; background: var(--panel-2); color: var(--ink); }
.bpf-boite.texte { text-align: left; width: 100%; flex: 1 1 140px; min-width: 70px; }
.bpf-form td.col.petit .bpf-boite.texte { width: 70px; flex: none; }
.bpf-boite.total { font-weight: 800; border-color: var(--ink); }
.bpf-boite.saisie { border-color: var(--warn); background: var(--warn-soft); }
.bpf-boite:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.bpf-boite[readonly] { cursor: default; }
.bpf-unite { font-size: 12px; color: var(--muted); }
.bpf-src { flex: none; width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; line-height: 1; }
.bpf-src:hover { color: var(--brand); border-color: var(--brand); }
.bpf-ecart { flex-basis: 100%; font-size: 11px; color: var(--bad); }
.bpf-aide { font-size: 12px; color: var(--muted); padding: 6px 12px 8px; }
.bpf-mention { font-size: 10.5px; color: var(--faint); margin-top: 6px; }
.bpf-num { text-align: right; font-weight: 800; margin-top: 6px; }
.bpf-methode { margin-top: 14px; max-width: 1060px; }
.bpf-anom { border-left: 4px solid var(--line-strong); }
.bpf-anom.bpf-n-bad { border-left-color: var(--bad); }
.bpf-anom.bpf-n-warn { border-left-color: var(--warn); }
.bpf-anom.bpf-n-info { border-left-color: var(--info); }
.bpf-regles td { vertical-align: middle; }
.bpf-regles .input { min-width: 180px; }
.bpf-regles tr.bpf-auto td { background: var(--brand-soft); }
.input.bpf-nsf { min-width: 240px; }
.input.bpf-corr { min-width: 190px; max-width: 260px; padding: 4px 8px; font-size: 12px; }
.bpf-etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bpf-etape { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: var(--panel-2); color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.bpf-etape b { color: var(--ink); font-size: 13px; }
.bpf-etape.fait { border-color: var(--ok); }
.bpf-etape.fait b::before { content: '✓ '; color: var(--ok); }
.bpf-etape.en-cours { border-color: var(--brand); background: var(--brand-soft); }
.bpf-histo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-height: 320px; overflow: auto; }
.bpf-rappel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.bpf-rappel > span { flex: 1 1 280px; }
@media (max-width: 760px) {
  .bpf-page { padding: 12px 10px; }
  .bpf-entete { flex-direction: column; }
  .bpf-cerfa { align-items: flex-start; }
  .bpf-champs { grid-template-columns: minmax(0, 1fr); }
  .bpf-etapes { grid-template-columns: minmax(0, 1fr); }
  .bpf-form td.lib { min-width: 160px; }
  .bpf-form td.col, .bpf-form th.col { width: 110px; }
  .bpf-boite { width: 84px; }
  .input.bpf-nsf { min-width: 0; }
}
/* ANCHOR:tablettes */
/* tablettes des stagiaires (salles.js) : icône au-dessus des places, listes, choix de la place */
.sl-tbill { z-index: 3; }
.sl-tabi { position: absolute; left: 15px; bottom: 38px; width: 15px; height: 21px; padding: 0; border-radius: 4px; border: 2px solid #1d2330; background: linear-gradient(160deg, #b5d0ff, #3d6fc4 70%); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer; pointer-events: auto; }
.sl-tabi::after { content: ""; position: absolute; right: -7px; top: -7px; width: 10px; height: 10px; border-radius: 50%; background: var(--tc, #6b7380); box-shadow: 0 0 0 2px var(--panel); }
.sl-tabi-ok { --tc: var(--ok); } .sl-tabi-eleve { --tc: var(--sl-place); } .sl-tabi-warn { --tc: var(--warn); } .sl-tabi-off { --tc: var(--bad); } .sl-tabi-recent { --tc: #9aa2ad; }
.sl-2d .sl-tabi { bottom: auto; top: -14px; left: 12px; width: 12px; height: 17px; }
.sl-tiny .sl-tabi { top: -12px; left: 8px; width: 9px; height: 12px; border-width: 1.5px; }
.sl-tiny .sl-tabi::after { right: -5px; top: -5px; width: 7px; height: 7px; }
.sl-tabst { position: absolute; left: 36px; bottom: 40px; display: flex; align-items: center; gap: 4px; padding: 2px 5px; border-radius: 6px; background: var(--panel); box-shadow: 0 0 0 1px var(--line-strong); white-space: nowrap; pointer-events: none; font-size: 10px; line-height: 1; }
.sl-2d .sl-tabst { bottom: auto; top: -14px; left: 28px; }
.sl-tiny .sl-tabst { display: none; }
/* batterie et connexion des tablettes */
.tb-bat { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11px; color: var(--ink); }
.tb-bat-corps { position: relative; width: 16px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; color: var(--muted); }
.tb-bat-corps::after { content: ""; position: absolute; right: -4px; top: 1.5px; width: 2px; height: 3px; border-radius: 0 1px 1px 0; background: var(--muted); }
.tb-bat-corps i { position: absolute; left: 1px; top: 1px; bottom: 1px; border-radius: 1px; background: var(--tb-c, var(--ok)); max-width: calc(100% - 2px); }
.tb-wifi { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.tb-wifi i { width: 3px; border-radius: 1px; background: var(--line-strong); }
.tb-wifi i:nth-child(1) { height: 3px; } .tb-wifi i:nth-child(2) { height: 5.5px; } .tb-wifi i:nth-child(3) { height: 8px; } .tb-wifi i:nth-child(4) { height: 11px; }
.tb-wifi i.on { background: var(--tb-c, var(--ok)); }
.tb-ok { --tb-c: var(--ok); } .tb-warn { --tb-c: var(--warn); } .tb-bad { --tb-c: var(--bad); }
.tb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tb-lgi { display: inline-block; width: 9px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.tb-legend { margin-top: 6px; }
.tb-etat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tb-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.tb-code { font: 800 20px/1 Consolas, 'Cascadia Mono', monospace; letter-spacing: .12em; padding: 8px 10px; border-radius: 8px; background: var(--brand-soft); }
.tb-code.small { font-size: 13px; padding: 3px 6px; }
.tb-connect { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.tb-connect ol { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 13px; }
.tb-connect ol li + li { margin-top: 4px; }
.tb-connect .input { flex: 1 1 260px; min-width: 0; }
.tb-qr .app-qr svg { width: 150px; height: 150px; }
.tb-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.tb-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-kv strong { font-weight: 600; overflow-wrap: anywhere; }
.tb-pal { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.tb-palb .sl-chip-seat { margin-left: auto; }
.tb-pal-vide { font-size: 12px; }
.tb-planpick { min-height: 60px; }
@media (max-width: 720px) { .tb-kv-grid { grid-template-columns: minmax(0, 1fr); } .tb-qr { display: none; } }
/* Réglages : compteur de la synchronisation obligatoire (hors ligne) */
.sync-oblig { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; }
.sync-oblig-jauge .fill { height: 8px; }
.sync-oblig-jauge.ok .fill i { background: var(--ok); }
.sync-oblig-jauge.warn .fill i { background: var(--warn); }
.sync-oblig-jauge.bad .fill i { background: var(--bad); }
/* ANCHOR:majgh */
/* Réglages : mise à jour du serveur depuis GitHub (admin.js, carteMajServeur) */
.majgh .note { margin-top: 10px; }
.majgh .props { grid-template-columns: 130px minmax(0, 1fr); }
.majgh .props .badge { white-space: normal; }
.majgh-details { margin-top: 12px; }
.majgh-details > summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.majgh-journal { margin: 8px 0 0; max-height: 240px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); font: 12px/1.5 Consolas, 'Cascadia Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.majgh-etapes { margin: 8px 0 10px; padding-left: 20px; line-height: 1.5; font-size: 13px; }
.majgh-etapes li + li { margin-top: 4px; }
/* ANCHOR:ameliorations — étapes d'une demande d'amélioration (support technique) */
.sup-etapes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sup-etapes li { position: relative; padding-left: 22px; color: var(--muted); }
.sup-etapes li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-strong); }
.sup-etapes li.ok { color: var(--ink); }
.sup-etapes li.ok::before { background: var(--ok); border-color: var(--ok); }
/* ANCHOR:listes-partagees — listes à lignes (support technique…) aussi dans l'interface d'ordinateur (mobile.css les reprend) */
.m-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.m-list:empty { display: none; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; color: inherit; font: inherit; min-height: 52px; }
button.m-row { cursor: pointer; }
button.m-row:hover { background: var(--panel-2); }
.m-row:last-child { border-bottom: 0; }
.m-row > svg { color: var(--muted); width: 20px; height: 20px; }
.m-row-main { flex: 1; min-width: 0; }
.m-row-main .faint { font-size: 13px; }
/* ANCHOR:glisser-deposer — lignes de tableau déplaçables vers un groupe (coffre-fort…) */
tr[draggable="true"] { cursor: grab; }
tr.glisse { opacity: .45; }
.depot-ok { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft) !important; }
/* ANCHOR:version-menu — numéro de version en bas de la barre latérale */
.side-version { font-size: 11px; color: var(--faint); text-align: center; letter-spacing: .02em; }
@media (max-width: 900px) { .side-version { font-size: 10px; } }
/* ANCHOR:coffre-colonnes — valeurs chiffrées affichées en colonne (masquées, œil pour afficher) */
.coffre-membres { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; padding: 4px 0; }
.coffre-membre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 6px; border-radius: var(--radius-s); }
.coffre-membre:hover { background: var(--panel-2); }
.coffre-membre > label:first-child { min-width: 220px; }
.coffre-secret { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.coffre-secret .mono { margin-right: 4px; letter-spacing: .04em; }
.coffre-secret .icon-btn { padding: 2px 4px; opacity: .7; }
.coffre-secret .icon-btn:hover, .coffre-secret .icon-btn.on { opacity: 1; color: var(--brand-text); }
.coffre-secret svg { width: 15px; height: 15px; }

/* lecteur PDF intégré (js/pdf-viewer.js) : plein écran au-dessus de la plateforme */
.pdfv { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--bg); }
.pdfv-barre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pdfv-titre { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; flex: 1 1 200px; }
.pdfv-titre span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfv-titre svg { width: 18px; height: 18px; flex: none; }
.pdfv-outils { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pdfv-actions { display: flex; align-items: center; gap: 6px; }
.pdfv-num { width: 64px; padding: 4px 6px; text-align: center; }
.pdfv-zoom { min-width: 58px; text-align: center; font-size: 13px; }
.pdfv-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.pdfv-corps { flex: 1; overflow: auto; position: relative; background: #525659; }
.pdfv-cadre { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.pdfv-attente { color: #fff; text-align: center; padding: 40px; }
.pdfv-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; min-width: min-content; }
.pdfv-page { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); flex: none; }
.pdfv-page canvas { display: block; }
.pdfv .empty { color: #fff; }
@media (max-width: 720px) { .pdfv-sep, .pdfv-zoom { display: none; } .pdfv-barre { padding: 6px 8px; } }

/* ---- EMS Drive (js/drive.js) ---- */
.drv { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.drv-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.drv-place { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; color: var(--ink); border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.drv-place svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.drv-place:hover { background: var(--panel-2); }
.drv-place.on { background: var(--panel-3); font-weight: 600; }
.drv-main { min-width: 0; border-radius: 10px; }
.drv-main.drop-zone { outline: 2px dashed var(--info); outline-offset: 4px; }
.drv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.drv-bar .search { flex: 1 1 220px; min-width: 0; }
.drv-crumbs { font-size: 13px; color: var(--muted); margin: 2px 0 8px; overflow-wrap: anywhere; }
.drv-crumbs a { color: var(--ink); text-decoration: none; }
.drv-crumbs a:hover { text-decoration: underline; }
.drv-table { width: 100%; }
.drv-table td { vertical-align: middle; }
.drv-table th { text-align: left; }
.drv-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drv-name > span:not(.drv-ic):not(.drv-flag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drv-ic { position: relative; flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.drv-ic svg { width: 24px; height: 24px; }
.drv-ic b { position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); font-size: 7.5px; line-height: 1; padding: 1px 2px; border-radius: 2px; color: #fff; }
.drv-ic.drv-dir { color: #d9a441; }
.drv-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; flex: none; }
.drv-flag svg { width: 12px; height: 12px; }
.drv-acts { display: flex; flex-direction: column; gap: 2px; }
.drv-act { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; color: var(--ink); border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.drv-act:hover { background: var(--panel-2); }
.drv-act.danger { color: var(--bad); }
.drv-act svg { width: 17px; height: 17px; }
.drv-shares { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.drv-share { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drv-pick { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; min-height: 120px; }
.drv-pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; background: none; color: var(--ink); border-radius: 6px; cursor: pointer; font: inherit; text-align: left; }
.drv-pick-row:hover { background: var(--panel-2); }
@media (max-width: 720px) {
  .drv { grid-template-columns: minmax(0, 1fr); }
  .drv-side { flex-direction: row; overflow-x: auto; position: static; }
  .drv-place { white-space: nowrap; padding: 7px 10px; }
  .drv-table th:nth-child(n+3), .drv-table td:nth-child(n+3):not(:last-child) { display: none; }
}

/* ---- EMS Office (js/office.js) : éditeur plein écran ---- */
.ems-office { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--panel); }
.ems-office-barre { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line); min-height: 40px; }
.ems-office-barre > .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ems-office-corps { flex: 1; min-height: 0; background: #fff; }
.ems-office-corps > div, .ems-office-corps iframe { width: 100%; height: 100%; border: 0; }

/* Modification groupée (listes) : un champ par ligne, case « appliquer » + valeur */
.bulk-fields { display: grid; gap: 8px; }
.bulk-field { display: grid; grid-template-columns: minmax(170px, 34%) 1fr; gap: 10px; align-items: center; }
.bulk-field .check { margin: 0; }
.bulk-field > .field { margin: 0; }
.bulk-field > .field > label:not(.check) { display: none; }
@media (max-width: 640px) { .bulk-field { grid-template-columns: 1fr; gap: 4px; } }
/* Comptabilité : postes dépliables par compte (compte de résultat, bilan) et écritures délimitées */
.tbl.postes .chev { display: inline-block; width: 14px; color: var(--faint); }
.tbl tr.sous-compte td { font-size: 13px; padding-top: 6px; padding-bottom: 6px; background: var(--panel-2); }
.tbl tr.sous-compte td:first-child { padding-left: 34px; }
.tbl tr.ecr-debut td { border-top: 2px solid var(--line-strong); }
.tbl tr.ecr-alt td { background: var(--panel-2); }
.icon-btn.mini { padding: 2px; }
.icon-btn.mini svg { width: 15px; height: 15px; }
.icon-btn.mini:hover { color: var(--brand-text); background: var(--panel-2); }

/* Lecture automatique d'une facture déposée : champs remplis à vérifier, avancement de la lecture */
.input.lf-lu { background: var(--ok-soft); border-color: var(--ok); }
.lf-etat:empty { display: none; }
.lf-etat { margin-top: 6px; }
.lf-etat.ok { color: var(--ok); }
.lf-etat.warn { color: var(--warn); }

/* ------------------------------------------------------------------ Visio (réunions vidéo, js/visio.js) */
.visio { position: fixed; inset: 0; z-index: 900; background: #0b0c0e; color: #eef0f3; display: flex; flex-direction: column; }
.visio-tete { display: flex; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #24272d; font-size: 14px; }
.visio-tete .visio-duree, .visio-tete .visio-nb { color: #9aa0a8; }
.visio-bandeau { background: #b00020; color: #fff; text-align: center; padding: 6px; font-size: 13px; font-weight: 600; }
.visio-corps { flex: 1; display: flex; min-height: 0; }
.visio-stage { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 10px; gap: 10px; }
.visio-scene { display: none; position: relative; flex: 1; min-height: 0; background: #000; border-radius: 10px; overflow: hidden; }
.visio.avec-partage .visio-scene { display: block; }
.visio-scene video { width: 100%; height: 100%; object-fit: contain; }
.visio-grille { flex: 1; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: minmax(160px, 1fr); min-height: 0; overflow: auto; }
.visio.avec-partage .visio-grille { flex: 0 0 150px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px; grid-auto-rows: 1fr; }
.visio-tuile { position: relative; background: #1b1e23; border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.visio-tuile.parle { border-color: #2fbf8f; }
.visio-tuile video { width: 100%; height: 100%; object-fit: cover; }
.visio-tuile.moi video { transform: scaleX(-1); }
.visio-tuile.sans-video video { display: none; }
.visio-avatar { display: none; position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: #373c44; font-size: 28px; font-weight: 700; align-items: center; justify-content: center; }
.visio-tuile.sans-video .visio-avatar { display: flex; }
.visio-nom { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 6px; font-size: 12px; }
.visio-panneau { width: 300px; border-left: 1px solid #24272d; padding: 12px 14px; overflow: auto; background: #141619; }
.visio-panneau h3 { margin: 0 0 10px; font-size: 15px; }
.visio-panneau h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; color: #9aa0a8; letter-spacing: .04em; }
.visio-ligne { display: flex; gap: 6px; align-items: center; padding: 5px 0; font-size: 13px; }
.visio-ligne span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.visio-vide { color: #9aa0a8; font-size: 13px; }
.visio-lien { margin-top: 10px; font-size: 12px; color: #9aa0a8; display: grid; gap: 6px; }
.visio-lien input { background: #0b0c0e; border: 1px solid #373c44; color: #eef0f3; border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.visio-mini { background: #22262c; color: #eef0f3; border: 1px solid #373c44; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.visio-mini.ok { background: #0e7c63; border-color: #0e7c63; }
.visio-barre { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px; border-top: 1px solid #24272d; }
.visio-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; background: #22262c; color: #eef0f3; border: 0; border-radius: 10px; padding: 8px 10px; font-size: 11px; cursor: pointer; }
.visio-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.visio-btn:hover { background: #2c3139; }
.visio-btn.off { background: #3a1d1d; color: #ff8a84; }
.visio-btn.on { background: #0e5f4c; }
.visio-btn.rouge { background: #b00020; }
.visio-badge { position: absolute; top: 2px; right: 8px; background: #f60000; color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; }
.visio-msg { display: inline-flex; gap: 10px; align-items: center; margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.visio-msg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.visio-msg.en-cours { border-color: var(--ok); }
@media (max-width: 700px) { .visio-panneau { position: absolute; right: 0; top: 48px; bottom: 70px; width: 86%; z-index: 2; } .visio-btn span { display: none; } .visio-btn { min-width: 48px; } }
/* page de l'invité (visio.html) */
.visio-page { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.visio-accueil { width: min(420px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 10px; }
.visio-accueil h1 { margin: 0; font-size: 20px; }
.visio-accueil p { margin: 0; color: var(--muted, #9aa0a8); }
.visio-logo { height: 34px; justify-self: start; }
.visio-erreur { color: var(--bad); font-size: 13px; min-height: 16px; }
.visio-attente { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: visio-tourne 1s linear infinite; }
@keyframes visio-tourne { to { transform: rotate(360deg); } }
.visio-rec-point { color: #ff5a52; font-size: 18px; line-height: 20px; }
.visio-btn.on .visio-rec-point { animation: visio-clignote 1s steps(2) infinite; }
@keyframes visio-clignote { 50% { opacity: .2; } }
.visio-stage { position: relative; }
.visio-st { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: 80%; display: grid; gap: 4px; pointer-events: none; z-index: 3; }
.visio-st div { background: rgba(0,0,0,.72); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 16px; line-height: 1.35; }
.visio-trad { position: absolute; right: 16px; bottom: 84px; z-index: 5; width: 290px; background: #141619; border: 1px solid #373c44; border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.visio-trad select { background: #0b0c0e; color: #eef0f3; border: 1px solid #373c44; border-radius: 6px; padding: 4px 6px; }
.visio-case { display: flex; gap: 8px; align-items: center; }
.visio-note { color: #9aa0a8; font-size: 12px; }
.visio-langues { display: flex; gap: 12px; justify-content: center; margin-top: 6px; font-size: 13px; }
.visio-langues a { color: var(--muted, #9aa0a8); text-decoration: none; }
.visio-langues a.on { color: var(--text, #eef0f3); font-weight: 600; }

/* --- Espace client du support technique (support.html, js/support-client.js) ------------------------------------- */
.hd-page { min-height: 100vh; background: var(--bg); }
.hd-card .hd-liens { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; }
.hd-card .hd-liens a, .hd-nav a { color: var(--muted); text-decoration: none; }
.hd-card .hd-liens a:hover, .hd-nav a:hover { color: var(--ink); }
.hd-card .hd-accueil { margin-top: 16px; white-space: pre-wrap; text-align: center; }
.hd-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hd-code { font-size: 22px; letter-spacing: 6px; text-align: center; }
.hd-app { min-height: 100vh; display: flex; flex-direction: column; }
.hd-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hd-marque { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.hd-marque img { height: 28px; width: auto; }
.hd-nav { display: flex; gap: 18px; font-size: 14px; }
.hd-main { width: min(860px, 100%); margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.hd-titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hd-titre h1 { margin: 0; font-size: 22px; }
.hd-liste { display: grid; gap: 8px; }
.hd-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; padding: 14px 18px; }
.hd-ligne:hover { border-color: var(--line-strong); }
.hd-sujet { font-weight: 600; }
.hd-vide { text-align: center; display: grid; gap: 8px; justify-items: center; }
.hd-form { display: grid; gap: 12px; }
/* assistance à distance (logiciel EMS Support) : code du poste, état, accès sans validation */
.hd-bureau { display: grid; gap: 6px; justify-items: center; text-align: center; }
.gate-card .hd-bureau { margin-top: 16px; }
.hd-bureau-code { font-size: 28px; font-weight: 700; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.hd-bureau-point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); vertical-align: middle; }
.hd-bureau-point.ok { background: var(--ok); }
.hd-bureau-point.actif { background: var(--bad); }
.hd-bureau-acces { display: grid; gap: 10px; text-align: left; justify-self: stretch; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.hd-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.hd-actions > .hd-actions { margin-right: auto; justify-content: flex-start; }
.hd-fil { display: grid; gap: 12px; }
.hd-msg { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 88%; }
.hd-msg.moi { justify-self: end; background: var(--panel-2); }
.hd-msg.ia { border-left: 3px solid var(--brand); }
.hd-msg.tech { border-left: 3px solid var(--ok); }
.hd-msg-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; flex-wrap: wrap; }
.hd-msg-texte { white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.hd-pieces { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.hd-pieces a { text-decoration: none; cursor: pointer; }
.hd-sources { margin-top: 8px; font-size: 13px; }
.hd-sources summary { cursor: pointer; color: var(--muted); }
.hd-source { margin-top: 6px; }
.hd-attente { animation: hd-clignote 1.4s ease-in-out infinite; }
@keyframes hd-clignote { 50% { opacity: .5; } }
.hd-bandeau { padding: 10px 14px; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.hd-bandeau.technicien { background: var(--warn-soft); color: var(--warn); }
.hd-bandeau.resolu { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 600px) { .hd-2 { grid-template-columns: 1fr; } .hd-msg { max-width: 100%; } .hd-tete { padding: 10px 16px; } }
.hd-entete { align-items: start; }
.hd-fil-equipe { margin: 16px 0; }
.hd-fil-equipe .hd-msg { max-width: 92%; }
.hd-msg.client { justify-self: start; }
.hd-msg.tech { justify-self: end; background: var(--panel-2); }
.hd-msg.note { justify-self: end; border-left: 3px solid var(--warn); background: var(--warn-soft); }
.hd-techs { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hd-droits { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); font-size: 13px; color: var(--muted); }
.hd-droits a { color: var(--muted); }
.hd-offre { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hd-form h3 { margin: 0; font-size: 16px; }
.hd-lignes { display: grid; gap: 8px; margin: 6px 0 12px; }
.hd-ligne-edit { display: flex; gap: 8px; align-items: flex-end; }
@media (max-width: 800px) { .hd-ligne-edit { flex-wrap: wrap; } }
.hd-logiciel { text-align: center; margin-top: 12px; }
/* espace support : onglets (libellé complet sur ordinateur ; barre d'onglets en bas sur téléphone) */
.hd-nav a.on { color: var(--ink); }
.hd-nav .hd-ico, .hd-nav .hd-court, .hd-nav .hd-mobile { display: none; }
.hd-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.hd-switch input { width: 20px; height: 20px; accent-color: var(--brand, #e10600); }
@media (max-width: 600px) {
  .hd-tete { position: sticky; top: 0; z-index: 5; padding: 8px 14px calc(8px) 14px; padding-top: max(8px, env(safe-area-inset-top)); }
  .hd-marque img { height: 22px; }
  .hd-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .hd-nav a, .hd-nav a.hd-mobile { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; padding: 4px 2px; min-height: 44px; justify-content: center; }
  .hd-nav .hd-ico { display: block; font-size: 19px; line-height: 1; }
  .hd-nav .hd-court { display: block; }
  .hd-nav .hd-long, .hd-nav .hd-deco { display: none; }
  .hd-nav a.on { color: var(--brand, #e10600); }
  .hd-main { padding: 16px 12px calc(84px + env(safe-area-inset-bottom)); }
  .hd-titre h1 { font-size: 22px; }
  .hd-offre { flex-wrap: wrap; gap: 8px; }
  .hd-offre .btn { width: 100%; justify-content: center; min-height: 44px; }
  .hd-actions { flex-wrap: wrap; }
  .hd-actions .btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }
}
/* charges « Par mois » : échéances payées en retrait */
.cm-payee td { opacity: .6; }

/* assistance à distance : visionneuse du technicien (js/bureau.js) */
.bd-postes { display: grid; gap: 6px; }
.bd-poste { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.bd-poste > div { flex: 1; }
.bd-poste.hors { opacity: .55; cursor: default; }
.bd-fenetre { position: fixed; inset: 0; z-index: 900; background: #000; display: flex; flex-direction: column; }
.bd-barre { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bd-etat { color: var(--muted); font-size: 13px; }
.bd-scene { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.bd-video { width: 100%; height: 100%; object-fit: contain; cursor: default; outline: none; background: #000; }
