/* Planning chantiers — feuille de style
   Charte graphique LOISON 2026 (Restyle_Loison2026_A4.pdf) : Bleu d'Encre #2A3651 (structure, textes importants),
   Orange Industriel #E75200 (accent, actions principales, alertes), Gris Acier #7B8494 (fonds secondaires), Blanc Pur.
   Typographie Aeonik → Manrope (Google Fonts, la plus proche librement utilisable) ; Barlow Condensed reste pour les
   données denses du planning. Le marquage des conflits garde des rayures, aux couleurs de la charte. */

:root {
  --ink: #2A3651;
  --ink-2: #3d4a66;
  --ink-3: #5b667d;
  --paper: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --line: #d8dde5;
  --line-2: #e8ebf0;
  --muted: #667085;
  --signal: #E75200;
  --blue: #c24600;          /* accent lisible sur blanc : liens, focus, éléments actifs (orange industriel assombri) */
  --blue-dark: #9e3900;
  --danger: #c62828;
  --ok: #2e8b6e;
  --hazard: repeating-linear-gradient(-45deg, #E75200 0 6px, #2A3651 6px 12px);
  --brand-orange: #E75200;
  --brand-ink: #2A3651;
  --brand-steel: #7B8494;

  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-head: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --side-w: 224px;
  --label-w: 196px;
  --lane-h: 46px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* fonds sombres de l'interface (menu, barre d'onglets, bulles, toasts) : Bleu d'Encre */
  --chrome: #2A3651;
  --blue-fill: #E75200;      /* actions principales : Orange Industriel, texte blanc */
  --blue-fill-2: #c94700;
  --chrome-2: #3a4866;
  --press: #2A3651;          /* bouton enfoncé, pastilles foncées */
  /* teintes douces (pastilles, alertes) et encres associées */
  --tint-red: #fbeeed;
  --tint-yellow: #fff6e0;
  --tint-blue: #fdeee6;      /* teinte d'accent (orange très clair) */
  --tint-orange: #fde3d3;
  --tint-green: #dff1e9;
  --tint-cream: #fffaf2;
  --tint-hl: #ffe6d6;
  --weekend: #f8f9fb;
  --stripe-a: #f0f2f5;
  --stripe-b: #e4e8ee;
  --holiday-stripe: #f8f6fc;
  --ink-orange: #9e3900;
  --ink-ochre: #8a6100;
  --ink-green: #1d6a52;
  --ink-red: #9b2c24;
  --ink-plan: #b34500;
  --muted-2: #a5adbb;
  color-scheme: light;
}

/* ------------------------------------------------------------ Mode sombre
   Choix dans « Mon compte » : clair (par défaut), sombre, ou automatique (selon l'appareil).
   data-theme est posé sur <html> par index.php ; seules les variables changent. */
:root[data-theme="dark"] {
  --ink: #e8ecf3; --ink-2: #c8d0dc; --ink-3: #a6b0c0; --paper: #111624; --surface: #19202f; --surface-2: #1f2738;
  --line: #2e384d; --line-2: #262f42; --muted: #96a0b2; --signal: #ff7a33; --blue: #ff8a4c; --blue-dark: #ffb084;
  --danger: #ef6b60; --ok: #4fc29a; --blue-fill: #E75200; --blue-fill-2: #ff6a1f; --chrome: #0d1220; --chrome-2: #26304a; --press: #3a4866;
  --tint-red: #3a1f1d; --tint-yellow: #33290f; --tint-blue: #3a2318; --tint-orange: #3d2414; --tint-green: #13302a;
  --tint-cream: #2a2216; --tint-hl: #4a2a12; --weekend: #141a28; --stripe-a: #1b2232; --stripe-b: #212a3c; --holiday-stripe: #201b2b;
  --ink-orange: #ffb084; --ink-ochre: #e8c45c; --ink-green: #6fd3ac; --ink-red: #f39088; --ink-plan: #ff9d5c; --muted-2: #6c778b;
  --holiday: #b8a2e3; --holiday-bg: #241e33;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink: #e8ecf3; --ink-2: #c8d0dc; --ink-3: #a6b0c0; --paper: #111624; --surface: #19202f; --surface-2: #1f2738;
    --line: #2e384d; --line-2: #262f42; --muted: #96a0b2; --signal: #ff7a33; --blue: #ff8a4c; --blue-dark: #ffb084;
    --danger: #ef6b60; --ok: #4fc29a; --blue-fill: #E75200; --blue-fill-2: #ff6a1f; --chrome: #0d1220; --chrome-2: #26304a; --press: #3a4866;
    --tint-red: #3a1f1d; --tint-yellow: #33290f; --tint-blue: #3a2318; --tint-orange: #3d2414; --tint-green: #13302a;
    --tint-cream: #2a2216; --tint-hl: #4a2a12; --weekend: #141a28; --stripe-a: #1b2232; --stripe-b: #212a3c; --holiday-stripe: #201b2b;
    --ink-orange: #ffb084; --ink-ochre: #e8c45c; --ink-green: #6fd3ac; --ink-red: #f39088; --ink-plan: #ff9d5c; --muted-2: #6c778b;
    --holiday: #b8a2e3; --holiday-bg: #241e33;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14.5px/1.5 var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 38px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.btn-primary:hover { background: var(--blue-fill-2); border-color: var(--blue-fill-2); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-icon { width: 38px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ Formulaires */
.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: 15px;
}
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.inline-fields { display: flex; gap: 8px; }
.inline-fields > * { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 36px; cursor: pointer; font-weight: 500; color: var(--ink-3); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--press); color: #fff; }

.notice { padding: 10px 12px; border-radius: var(--r-sm); border-left: 4px solid var(--blue); background: var(--surface-2); margin: 0 0 12px; }
.notice-error { border-color: var(--danger); background: var(--tint-red); }
.notice-warn { border-color: var(--signal); background: var(--tint-yellow); }

/* ------------------------------------------------------------ Connexion */
.auth-page { display: grid; place-items: center; min-height: 100%; padding: 24px; background: var(--chrome); }
.auth-card {
  width: min(420px, 100%); background: var(--surface); border-radius: var(--r-md);
  padding: 28px 28px 24px; position: relative; overflow: hidden;
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--hazard); }
.auth-title { font-size: 30px; margin: 6px 0 4px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-card .btn-primary { width: 100%; min-height: 44px; }

/* ------------------------------------------------------------ Coque */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--chrome); color: #d3d9e4; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.brand-mark { width: 30px; height: 30px; border-radius: 6px; background: var(--chrome-2); display: grid; place-items: center; }
.brand-name { font-family: var(--f-cond); font-weight: 600; font-size: 20px; line-height: 1.05; }
.nav { display: grid; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: transparent; color: inherit; text-align: left;
  padding: 10px 10px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; position: relative;
}
.nav button svg { width: 20px; height: 20px; opacity: .8; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button[aria-current=page] { background: var(--chrome-2); color: #fff; }
.nav button[aria-current=page]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; background: var(--signal); border-radius: 0 2px 2px 0; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-foot strong { display: block; color: #fff; font-weight: 600; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--signal); color: var(--ink); font-size: 12px; font-weight: 700; }

.main { min-width: 0; display: flex; flex-direction: column; }
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 16px 22px 12px; }
.page-head h1 { font-size: 28px; margin-right: auto; }
.page-body { padding: 0 22px 28px; min-width: 0; }

/* ------------------------------------------------------------ Barre planning */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 22px 12px; }
.period { font-family: var(--f-cond); font-size: 26px; font-weight: 600; margin: 0 8px 0 4px; min-width: 9ch; text-transform: none; }
.toolbar .spacer { flex: 1; }
.toolbar select { width: auto; max-width: 230px; min-height: 38px; }
.conflict-btn { border-color: var(--signal); background: var(--tint-yellow); }
.conflict-btn .hz { width: 14px; height: 14px; border-radius: 2px; background: var(--hazard); }
.conflict-btn.none { border-color: var(--line); background: var(--surface); color: var(--muted); }
.conflict-btn.none .hz { background: var(--line); }
.sync { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------ Timeline (jour / semaine) */
.board { margin: 0 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; max-height: calc(100vh - 150px); }
.tl { min-width: 860px; --units: 7; }
.tl.day { min-width: 1100px; }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); }
.tl-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-corner { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); padding: 8px 12px; font-size: 12px; color: var(--muted); display: flex; align-items: flex-end; }
.tl-units { display: grid; grid-template-columns: repeat(var(--units), minmax(0, 1fr)); }
.tl-unit { padding: 8px 8px 6px; border-left: 1px solid var(--line-2); position: relative; }
.tl-unit:first-child { border-left: 0; }
.tl-unit .dow { font-size: 12px; color: var(--muted); }
.tl-unit .dnum { font-family: var(--f-cond); font-size: 22px; font-weight: 600; line-height: 1; }
.tl-unit.today::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--hazard); }
.tl-unit.today .dnum { color: var(--ink); }
.tl-unit.weekend { background: var(--surface-2); }
.tl.day .tl-unit { padding: 8px 4px; font-family: var(--f-cond); font-size: 15px; font-weight: 600; color: var(--ink-3); }

.tl-group { position: sticky; left: 0; padding: 14px 12px 6px; font-family: var(--f-cond); font-size: 15px; font-weight: 600; color: var(--ink-3); background: var(--surface); border-bottom: 1px solid var(--line-2); }
.tl-group span { color: var(--muted); font-family: var(--f-body); font-weight: 400; font-size: 13px; margin-left: 6px; }
.tl-row { border-bottom: 1px solid var(--line-2); }
.tl-label { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-label .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tl-label .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-label .sub { font-size: 12px; color: var(--muted); }
.tl-label.unassigned .nm { color: var(--muted); font-style: italic; }
.tl-track {
  position: relative; display: grid; grid-template-columns: repeat(var(--units), minmax(0, 1fr));
  grid-auto-rows: var(--lane-h); row-gap: 4px; padding: 5px 0; min-height: calc(var(--lane-h) + 10px);
  background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px);
  background-size: calc(100% / var(--units)) 100%;
}
.tl.day .tl-track { background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px); background-size: calc(200% / var(--units)) 100%; }
.tl-track.can-edit { cursor: cell; }
.tl-shade { position: absolute; top: 0; bottom: 0; background: var(--surface-2); pointer-events: none; z-index: 0; }
.tl-today { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--signal) 9%, transparent); pointer-events: none; z-index: 0; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); pointer-events: none; z-index: 1; }
.drop-hover { outline: 2px solid var(--blue); outline-offset: -2px; background-color: color-mix(in srgb, var(--blue) 6%, transparent); }

/* ------------------------------------------------------------ Carte d'intervention */
.task {
  -webkit-touch-callout: none;
  position: relative; z-index: 1; margin: 0 3px; min-width: 0;
  border-radius: var(--r-sm); padding: 5px 8px 5px 10px;
  background: color-mix(in srgb, var(--c, var(--blue)) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c, var(--blue)) 40%, transparent);
  border-left: 4px solid var(--c, var(--blue));
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
.task:hover { border-color: var(--c, var(--blue)); }
.task .t1 { font-weight: 600; font-size: 13.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .t2 { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.absence { --c: #6b7a86; background: repeating-linear-gradient(135deg, var(--stripe-a) 0 7px, var(--stripe-b) 7px 14px); border-style: dashed; border-left-style: solid; }
.task.st-termine { opacity: .62; }
.task.st-termine .t1::before { content: "✓ "; color: var(--ok); }
.task.st-annule { opacity: .45; }
.task.st-annule .t1 { text-decoration: line-through; }
.task.st-en_cours { box-shadow: inset 0 -3px 0 var(--ok); }
.task.conflict { border-color: var(--ink); padding-right: 18px; }
.task.conflict::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 10px; background: var(--hazard); }
.task.dragging { opacity: .35; }
.task.readonly { cursor: default; }
.ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .92; box-shadow: 0 10px 28px rgba(42,54,81,.28); transform: rotate(-1.5deg); }
.task.selected { outline: 3px solid var(--ink); outline-offset: -1px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 70%, transparent); }
.task .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; }
.task .rs::after { content: ""; position: absolute; right: 3px; top: 30%; bottom: 30%; width: 2px; border-radius: 1px; background: var(--c, var(--blue)); opacity: 0; }
.task:hover .rs::after, .task.resizing .rs::after { opacity: .7; }
.task.conflict .rs { right: 10px; }
.task.resizing { box-shadow: 0 0 0 2px var(--blue); }
.tl-sel {
  position: absolute; top: 3px; bottom: 3px; z-index: 3; pointer-events: none;
  background: color-mix(in srgb, var(--blue) 14%, transparent); border: 2px dashed var(--blue); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
  font-size: 12.5px; font-weight: 600; color: var(--blue-dark); white-space: nowrap; overflow: hidden;
}
.tl-label .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#selmode-btn[aria-pressed=true] { background: var(--press); color: #fff; border-color: var(--press); }

/* ------------------------------------------------------------ Barre de sélection */
.selbar {
  position: fixed; z-index: 820; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--signal);
  border-radius: var(--r-md); padding: 10px 12px; box-shadow: 0 14px 40px rgba(42,54,81,.28);
}
.selbar select { width: auto; min-height: 38px; max-width: 200px; }
.sel-count { font-family: var(--f-cond); font-size: 18px; margin-right: 4px; }

/* ------------------------------------------------------------ Discussion latérale */
.chat-drawer {
  position: fixed; z-index: 850; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(42,54,81,.18);
  display: flex; flex-direction: column;
}
.chat-drawer .convo { flex: 1; }
.chat-drawer .convo-head { padding: 10px 12px; }
.chat-drawer .chan-select { flex: 1; min-width: 0; font-weight: 600; }
.chat-drawer .msgs { padding: 12px 14px 8px; }
.chat-drawer .att-img img { max-width: 200px; }

/* ------------------------------------------------------------ Menu latéral réductible */
.shell { transition: grid-template-columns .18s ease; }
.brand { position: relative; }
.side-toggle {
  margin-left: auto; width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.14); border-radius: 6px; background: transparent; color: #d3d9e4; cursor: pointer;
}
.side-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-toggle svg { width: 16px; height: 16px; transition: transform .18s; }
.shell.side-mini { grid-template-columns: 64px minmax(0, 1fr); }
.side-mini .side { padding: 18px 8px; }
.side-mini .brand { flex-direction: column; padding: 4px 0 18px; gap: 8px; }
.side-mini .brand-name, .side-mini .nav button span:not(.badge), .side-mini .side-foot { display: none; }
.side-mini .side-toggle { margin: 0; }
.side-mini .side-toggle svg { transform: rotate(180deg); }
.side-mini .nav button { justify-content: center; padding: 11px 0; }
.side-mini .nav button[aria-current=page]::before { left: -8px; }
.side-mini .nav .badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; font-size: 10.5px; padding: 0 4px; }

/* ------------------------------------------------------------ Planning plus lisible */
:root { --lane-h: 50px; --label-w: 220px; }
.task { background: color-mix(in srgb, var(--c, var(--blue)) 20%, var(--surface)); border-left-width: 5px; }
.task .t1 { font-size: 14px; }
.task .t2 { color: var(--ink-2); }
.tl-group { background: var(--surface-2); color: var(--ink-2); font-size: 16px; text-transform: uppercase; letter-spacing: .03em; }
.tl-row:hover .tl-label, .tl-row:hover .tl-track { background-color: color-mix(in srgb, var(--blue) 3%, var(--surface)); }
.tl-label .nm { font-weight: 600; }

/* ------------------------------------------------------------ Fenêtre d'intervention + discussion */
.modal.wide.xwide { width: min(1080px, 100%); }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 20px; align-items: stretch; }
.thread { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.thread-head svg { width: 18px; height: 18px; color: var(--ink-3); }
.thread-head .muted { font-size: 12.5px; flex-basis: 100%; }
.thread-msgs { flex: 1; overflow: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.thread-msgs .empty { padding: 24px 8px; font-size: 14px; }
.thread-msgs .empty p { margin: 0 0 6px; }
.thread-msgs .msg { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
.thread-msgs .avatar { width: 30px; height: 30px; font-size: 13px; }
.thread-msgs .att-img img { max-width: 180px; max-height: 140px; }
.thread-compose { position: relative; border-top: 1px solid var(--line); background: var(--surface); padding: 8px 10px; }
.thread-compose textarea { min-height: 42px; max-height: 120px; resize: none; flex: 1; }
.thread-empty { padding: 24px 16px; font-size: 14px; }
.thread-empty p { margin: 0 0 8px; }

/* ------------------------------------------------------------ Fenêtres compactes (intervention, action) */
.compact-modal .modal-head { padding: 12px 18px 2px; }
.compact-modal .modal-head h2 { font-size: 21px; }
.compact-modal .modal-body { padding: 8px 18px 10px; }
.compact-modal .modal-foot { padding: 8px 18px 12px; }
.compact-modal .btn { min-height: 34px; }
.compact-modal input:not([type=checkbox]):not([type=radio]):not([type=color]), .compact-modal select, .compact-modal textarea { min-height: 34px; padding: 5px 8px; font-size: 14px; }
.compact-modal textarea { min-height: 52px; }
.compact-modal .seg button { min-height: 32px; padding: 0 12px; font-size: 14px; }
.compact-modal .conflict-note { padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.compact-modal .notice { margin-bottom: 8px; padding: 6px 10px; font-size: 13.5px; }
.form-grid.compact { gap: 8px 12px; }
.form-grid.compact label, .form-grid.compact .field { gap: 3px; font-size: 12.5px; }
.form-grid.compact .field-label { font-size: 12.5px; }
.form-grid.compact .inline-fields { gap: 6px; }
.form-grid.compact .inline-fields input[type=time] { flex: 0 0 96px; }
.form-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-top label { flex-direction: row; display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12.5px; }
.form-top label select { width: auto; }
.opt { font-weight: 400; color: var(--muted); }
.form-info { font-size: 12px; margin: 8px 0 0; }
.compact-modal .res-pick { max-height: min(210px, 32vh); padding: 2px 8px 6px; }
.compact-modal .res-pick-group { margin: 4px 0 2px; font-size: 13px; }
.compact-modal .res-pick label.check { min-height: 24px; font-size: 13.5px; }
.compact-modal .task-layout { gap: 16px; }
/* la discussion prend la hauteur du formulaire et défile à l'intérieur */
.compact-modal .thread { height: 0; min-height: 100%; max-height: none; }
.compact-modal .thread-msgs { min-height: 120px; }

/* ------------------------------------------------------------ Actions */
.page-head select { width: auto; max-width: 240px; min-height: 38px; }
.prio { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio-basse { background: var(--line-2); color: var(--ink-3); }
.prio-normale { background: var(--tint-blue); color: var(--blue-dark); }
.prio-haute { background: var(--tint-orange); color: var(--ink-orange); }
.prio-urgente { background: var(--danger); color: #fff; }
.prio-seg button[aria-pressed=true].prio-basse { background: var(--chrome-2); color: #fff; }
.prio-seg button[aria-pressed=true].prio-normale { background: var(--blue-fill); color: #fff; }
.prio-seg button[aria-pressed=true].prio-haute { background: #d9822b; color: #fff; }
.prio-seg button[aria-pressed=true].prio-urgente { background: var(--danger); color: #fff; }
.due { font-size: 13px; white-space: nowrap; }
.due.late { color: var(--danger); font-weight: 600; }
.due.soon { color: #b06a00; font-weight: 600; }
.pill.done { background: var(--tint-green); color: var(--ok); }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: var(--surface-2); }
.act-main { max-width: 420px; }
.act-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.act-counts { white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.act-counts span { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; }
.act-counts svg { width: 14px; height: 14px; }
/* bouton 🗑 de chaque ligne et corbeille des actions (1.37.0) */
.act-row-btns { white-space: nowrap; }
.act-row-btns .act-del-btn { opacity: .45; }
tr:hover .act-row-btns .act-del-btn, .act-row-btns .act-del-btn:focus-visible { opacity: 1; }
@media (hover: none) { .act-row-btns .act-del-btn { opacity: 1; } }
.act-trash-table .actions { display: flex; gap: 6px; justify-content: flex-end; }
/* Liste des actions : toutes les colonnes tiennent dans l'écran (ordinateur) — marges réduites,
   textes longs sur deux lignes au plus, « Clôturer » réduit à ✔ sur les écrans moyens */
@media (min-width: 761px) {
  table.list.actions-table { min-width: 0; font-size: 13.5px; }
  table.list.actions-table th, table.list.actions-table td { padding: 8px 7px; }
  table.list.actions-table th:first-child, table.list.actions-table td:first-child { padding-left: 12px; }
  table.list.actions-table th:last-child, table.list.actions-table td:last-child { padding-right: 12px; }
  table.list.actions-table th { line-height: 1.25; }
  .actions-table .act-main { min-width: 150px; max-width: none; width: 26%; }
  .actions-table .act-main > strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .actions-table .act-desc { max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .actions-table .act-proj { min-width: 100px; max-width: 170px; }
  .actions-table .act-who { max-width: 120px; overflow-wrap: anywhere; }
  .actions-table .act-plan-link { max-width: 125px; flex-wrap: wrap; row-gap: 0; }
  .actions-table .act-plan-link span:not(.act-ind) { max-width: 100px; }
  .actions-table .act-due { min-width: 78px; }
  .actions-table .act-due .due { white-space: normal; }
  .actions-table .act-proj { overflow-wrap: anywhere; }
  .actions-table .act-last { font-size: 12.5px; white-space: normal; min-width: 72px; }
  .actions-table .act-last-at { display: block; }
  .actions-table .act-last .act-desc { max-width: 110px; -webkit-line-clamp: 1; }
  .actions-table .act-counts span { margin-right: 4px; }
  .actions-table .prio { white-space: nowrap; }
  .actions-table .act-close-btn { padding-inline: 8px; }
}
@media (min-width: 761px) and (max-width: 1500px) {
  .actions-table .act-close-btn .lbl { display: none; }
}
.act-link { display: flex; align-items: center; gap: 4px; }
.act-link .btn-icon { width: 28px; min-height: 28px; }
.act-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; max-width: 230px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; }
.fchip.new { border-style: dashed; }
.fchip .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.fchip .fext { flex: none; display: grid; place-items: center; width: 34px; height: 28px; border-radius: 3px; background: var(--chrome); color: #fff; font-family: var(--f-cond); font-weight: 700; font-size: 11px; text-decoration: none; }
.fchip.new .fext { background: var(--blue-fill); }
.fchip .fthumb { flex: none; width: 34px; height: 28px; padding: 0; border: 0; border-radius: 3px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.fchip .fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fchip button:not(.fthumb) { border: 0; background: transparent; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; flex: none; }
.fchip button:not(.fthumb):hover { background: var(--line); }
.btn-add-files { min-height: 30px !important; font-size: 13px; padding: 0 10px; }
/* pièces jointes d'une action en vignettes (1.19.0) : aperçu immédiat, ✏ annoter, × retirer */
.act-files .ftile { position: relative; display: flex; flex-direction: column; width: 108px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 12px; }
.act-files .ftile.new { border-style: dashed; border-color: var(--blue-fill); }
.ftile-view { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.ftile-thumb { position: relative; display: grid; place-items: center; width: 98px; height: 74px; overflow: hidden; border-radius: 3px; background: var(--surface-2); }
.ftile-thumb img, .ftile-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.ftile-thumb canvas { object-fit: contain; background: #fff; }
.ftile-ext { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 3px; background: var(--chrome); color: #fff; font-family: var(--f-cond); font-weight: 700; font-size: 12px; }
.ftile-pages { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; }
.ftile-name { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.ftile-note { color: var(--blue); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftile-btns { position: absolute; top: 6px; right: 6px; display: flex; gap: 3px; }
.ftile-btn { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #2A3651; box-shadow: 0 1px 3px rgba(0,0,0,.35); cursor: pointer; font: 700 14px/1 var(--f-body, system-ui); padding: 0; }
.ftile-btn svg { width: 14px; height: 14px; }
.ftile-btn:hover { background: var(--signal); color: #fff; }
.ftile-adds { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
/* éditeur d'annotation d'une pièce jointe */
.modal.ae-modal { width: min(1200px, 96vw); max-width: none; height: 94vh; height: 94dvh; max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.modal.ae-modal .modal-body { flex: 1; min-height: 0; display: flex; padding: 8px 12px; }
.ae-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.ae-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ae-pages { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ae-stage { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.ae-sheet { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(42,54,81,.25); }
.ae-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ae-ann { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ae-ann.on { touch-action: none; cursor: crosshair; }
.ae-ann .ann-hit { pointer-events: stroke; }
.ae-ann .ann-text { pointer-events: all; }
@media (max-width: 720px) { .modal.ae-modal { width: 100vw; height: 100dvh; border-radius: 0; } .ae-info { display: none; } }
.act-source { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; font-size: 13.5px; }
.act-source .muted { font-size: 12px; margin-bottom: 2px; }
.act-source .att-img img { max-width: 120px; max-height: 90px; }
.act-closed { border-color: var(--ok); background: var(--tint-green); }
.btn-close-action { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.btn-close-action:hover { background: var(--ok); color: #fff; border-color: var(--ok); }
.action-ref { background: var(--tint-orange); color: var(--ink-orange); }
.action-ref.done { background: var(--tint-green); color: var(--ok); }
.msg-tools { display: flex; gap: 4px; }
.msg-tools .del { visibility: hidden; }
.msg:hover .msg-tools .del { visibility: visible; }
@media (pointer: coarse) { .msg-tools .del { visibility: visible; } }

/* ------------------------------------------------------------ En-tête du planning */
.pl-head { display: grid; gap: 10px; padding: 14px 22px 12px; background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.pl-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.pl-row .spacer { flex: 1; }
.pl-head .period { margin: 0 4px; font-size: 26px; }
.pl-nav { display: inline-flex; align-items: stretch; background: var(--paper); border-radius: 10px; padding: 3px; gap: 2px; }
.nav-btn { border: 0; background: transparent; min-height: 34px; min-width: 34px; padding: 0 8px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; }
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn:hover { background: var(--surface); box-shadow: 0 1px 2px rgba(42,54,81,.12); color: var(--ink); }
.nav-btn.today { padding: 0 14px; }
.btn-new { min-height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 2px 6px color-mix(in srgb, var(--blue) 35%, transparent); }
.pl-head .conflict-btn { border-radius: 10px; min-height: 36px; }
.pl-controls { gap: 8px 18px; }
.ctl { display: inline-flex; align-items: center; gap: 8px; }
.ctl-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.pill-seg { display: inline-flex; background: var(--paper); border-radius: 10px; padding: 3px; gap: 2px; }
.pill-seg button { border: 0; background: transparent; min-height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill-seg button:hover { color: var(--ink); }
.pill-seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(42,54,81,.16); }
.pill-seg .swap { font-size: 16px; line-height: 1; color: var(--blue); }
.tool-group { display: inline-flex; background: var(--paper); border-radius: 10px; padding: 3px; gap: 2px; }
.tool { position: relative; border: 0; background: transparent; min-height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tool svg { width: 17px; height: 17px; color: var(--ink-3); }
.tool:hover { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(42,54,81,.12); }
.tool[aria-pressed=true] { background: var(--press); color: #fff; }
.tool[aria-pressed=true] svg { color: #fff; }
.tool .badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; font-size: 10.5px; padding: 0 4px; }
.pl-head ~ .filterbar { padding-top: 0; }
.pl-head ~ .board { max-height: calc(100vh - 215px); }
@media (max-width: 1280px) { .tool-lbl { display: none; } .tool { padding: 0 9px; } }

/* ------------------------------------------------------------ Ressources libres (bouton « Sans affectation ») */
.free-row { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); border-bottom: 2px solid color-mix(in srgb, var(--ok) 35%, var(--line)); }
.free-row .tl-label { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.free-ico { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); flex: none; }
.free-ico svg { width: 15px; height: 15px; }
.free-track { background-image: none !important; cursor: default !important; }
.free-cell { margin: 0 3px; padding: 4px 6px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; }
.free-cell strong { font-family: var(--f-cond); font-size: 18px; color: var(--ok); }
.free-cell.none { border-style: dashed; border-color: var(--line); color: var(--muted); }
.free-cell.none strong { color: var(--muted); }
.free-cell.weekend { opacity: .6; }
.free-names { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.free-empty { padding: 16px 20px; color: var(--muted); font-size: 14px; }
.tp-cell.free-col { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); font-size: 12.5px; color: var(--ink-2); cursor: default; }
.tp-cell.free-col strong { font-family: var(--f-cond); font-size: 18px; color: var(--ok); }
.tp-cell.free-col.none strong { color: var(--muted); }
.tp-cell.free-col .free-names { white-space: normal; }
#free-btn[aria-pressed=true] { background: var(--ok); color: #fff; }
#free-btn[aria-pressed=true] svg { color: #fff; }

/* ------------------------------------------------------------ Prévisionnel de charge */
.fc-page { display: grid; gap: 14px; }
.fc-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.fc-controls .spacer { flex: 1; }
.fc-controls select { width: auto; min-height: 36px; }
.fc-period { font-family: var(--f-cond); font-size: 20px; font-weight: 600; }
.fc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fc-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; border-top: 4px solid var(--line); }
.fc-kpi.good { border-top-color: var(--ok); }
.fc-kpi.warn { border-top-color: var(--signal); }
.fc-kpi.bad { border-top-color: var(--danger); }
.fc-kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fc-kpi-value { font-family: var(--f-cond); font-size: 34px; font-weight: 600; line-height: 1.1; margin-top: 2px; color: var(--ink); }
.fc-kpi-sub { font-size: 12.5px; color: var(--ink-3); }
.fc-kpi.bad .fc-kpi-sub { color: var(--danger); font-weight: 600; }
.fc-card { padding: 16px 18px; }
.fc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fc-card-head h2 { margin: 0; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 60%; justify-content: flex-end; }
.fc-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.fc-leg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.fc-leg-line { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--ink); position: relative; }
.fc-chart { position: relative; }
.fc-chart svg { display: block; }
.fc-grid { stroke: var(--line-2); stroke-width: 1; }
.fc-axis { stroke: var(--line); stroke-width: 1; }
.fc-tick, .fc-xsub { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.fc-xlab { fill: var(--ink-2); font-size: 12px; font-weight: 600; font-family: var(--f-body); }
.fc-cap { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.fc-cap-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.fc-over { fill: var(--danger); font-size: 12px; }
.fc-hl { fill: color-mix(in srgb, var(--blue) 6%, transparent); }
.fc-tip { position: absolute; z-index: 5; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(42,54,81,.2); padding: 10px 12px; font-size: 13px; pointer-events: none; }
.fc-tip-title { font-weight: 700; margin-bottom: 6px; }
.fc-tip-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 1px 0; }
.fc-tip-row i { width: 10px; height: 10px; border-radius: 3px; }
.fc-tip-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.fc-tip-sum { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-2); margin-top: 5px; padding-top: 5px; color: var(--ink-2); }
.fc-tip-gap { margin-top: 6px; font-weight: 600; }
.fc-tip-gap.bad { color: var(--danger); }
.fc-tip-gap.good { color: var(--ok); }
.fc-grid-wrap { overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); max-height: 60vh; }
.fc-table { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.fc-table th, .fc-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: var(--surface); }
.fc-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.fc-table thead th.today { box-shadow: inset 0 -3px 0 var(--signal); }
.fc-table .num { text-align: center; }
.fc-sticky { position: sticky; left: 0; z-index: 1; min-width: 230px; text-align: left; }
.fc-table thead .fc-sticky { z-index: 3; }
.fc-name { display: flex; gap: 8px; align-items: center; }
.fc-name .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.fc-in { width: 54px !important; min-height: 30px !important; padding: 3px 4px !important; text-align: center; font-size: 14px !important; border-color: transparent !important; background: var(--surface-2) !important; border-radius: 6px !important; }
.fc-in:hover { border-color: var(--line) !important; }
.fc-in:focus { border-color: var(--blue) !important; background: var(--surface) !important; }
.fc-in:not(:placeholder-shown) { background: color-mix(in srgb, var(--blue) 10%, var(--surface)) !important; font-weight: 600; }
.fc-in.saving { opacity: .6; }
.fc-in.saved { box-shadow: 0 0 0 2px var(--ok) !important; }
.fc-in.bad { box-shadow: 0 0 0 2px var(--danger) !important; }
td.mixed { position: relative; }
td.mixed::after { content: "≈"; position: absolute; top: 1px; right: 3px; font-size: 10px; color: var(--muted); }
.fc-total { font-weight: 600; color: var(--ink-2); }
.fc-foot td { background: var(--surface-2); font-weight: 600; }
.fc-foot.load td:first-child, .fc-foot.cap td:first-child { color: var(--ink-2); }
.fc-foot.load { border-top: 2px solid var(--line); }
.fc-foot.load td { border-top: 2px solid var(--line); }
.fc-gap.bad, .fc-foot td.bad { color: var(--danger); background: var(--tint-red); }
.fc-gap.good { color: var(--ok); }
@media (max-width: 860px) { .fc-legend { max-width: none; justify-content: flex-start; } .fc-sticky { min-width: 150px; } }

/* ------------------------------------------------------------ Logo Loison */
.brand { align-items: flex-start; }
.brand-logo { display: grid; gap: 6px; min-width: 0; flex: 1; }
.brand-logo img { display: block; width: 100%; max-width: 150px; height: auto; background: #fff; border-radius: 8px; padding: 6px 8px; }
.brand-logo .brand-name { font-size: 14px; color: #d3d9e4; font-weight: 600; }
.brand .brand-mark { display: none; }
.side-mini .brand-logo { display: none; }
.side-mini .brand .brand-mark { display: grid; }
.auth-logo { display: block; width: 170px; height: auto; margin: 6px 0 10px; }

/* ------------------------------------------------------------ Ressources dans les lignes d'affaires, colonnes déployées */
.tl-label .sub.res-names { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-colhead .sub.who { color: var(--ink-3); }
.tp-colhead .team-toggle { margin-top: 1px; }
.tp-colhead.open { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.tp-colhead.child { background: var(--surface-2); border-top: 3px solid var(--line); }
.tp-colhead.child .member-av { width: 22px; height: 22px; font-size: 10px; margin-top: 1px; }
.tp-colhead.child .dot, .tp-colhead.child span.member-av:empty { border-radius: 3px; width: 10px; height: 10px; margin-top: 5px; }
.tp-cell.child { background-color: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
@media (max-width: 860px) { .tl-label .sub.res-names { display: block; font-size: 10.5px; } }

/* ------------------------------------------------------------ Densité : plus de colonnes, texte lisible */
.board[data-density=compact] { --label-w: 170px; --lane-h: 42px; }
.board[data-density=compact] .tl { min-width: 700px; }
.board[data-density=compact] .tl.day { min-width: 900px; }
.board[data-density=compact] .task { padding: 3px 6px 3px 8px; border-left-width: 4px; }
.board[data-density=compact] .task .t1 { font-size: 13px; }
.board[data-density=compact] .task .t2 { font-size: 11.5px; }
.board[data-density=compact] .tl-label { padding: 6px 10px; }
.board[data-density=compact] .tp { --tp-first: 82px; --tp-col: 140px; }
.board[data-density=compact] .tp-cell { min-height: 56px; }
.board[data-density=compact] .mcell { min-height: 100px; }

.board[data-density=max] { --label-w: 140px; --lane-h: 36px; }
.board[data-density=max] .tl, .board[data-density=max] .tl.day { min-width: 0; }
.board[data-density=max] .tl-track { row-gap: 3px; padding: 3px 0; }
.board[data-density=max] .task { padding: 2px 5px 2px 6px; border-left-width: 3px; margin: 0 2px; }
.board[data-density=max] .task .t1 { font-size: 12.5px; font-weight: 600; }
.board[data-density=max] .task .t2 { font-size: 11px; }
.board[data-density=max] .tl-label { padding: 4px 8px; gap: 6px; }
.board[data-density=max] .tl-label .nm { font-size: 13px; }
.board[data-density=max] .tl-label .sub { font-size: 11px; }
.board[data-density=max] .tl-group { padding: 8px 10px 4px; font-size: 13px; }
.board[data-density=max] .tl-unit { padding: 5px 5px 4px; }
.board[data-density=max] .tl-unit .dnum { font-size: 18px; }
.board[data-density=max] .tl.day .tl-unit { font-size: 13px; padding: 5px 2px; }
.board[data-density=max] .tp { --tp-first: 64px; --tp-col: 112px; }
.board[data-density=max] .tp-colhead { padding: 6px 7px; gap: 5px; }
.board[data-density=max] .tp-colhead .nm { white-space: normal; font-size: 12.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board[data-density=max] .tp-colhead .sub { font-size: 10.5px; }
.board[data-density=max] .tp-count { display: none; }
.board[data-density=max] .tp-rowhead { padding: 4px 6px; }
.board[data-density=max] .tp-rowhead .dnum { font-size: 18px; }
.board[data-density=max] .tp-cell { min-height: 44px; padding: 2px; gap: 2px; }
.board[data-density=max] .tp-cell .task { padding: 2px 5px 2px 6px; }
.board[data-density=max] .tp-cell .task .t1 { font-size: 12px; }
.board[data-density=max] .mcell { min-height: 86px; }
.board[data-density=max] .mcell .task .t1 { font-size: 12px; }

/* plein écran : menu latéral masqué */
.focus-mode .shell { grid-template-columns: minmax(0, 1fr) !important; }
.focus-mode .side { display: none; }

/* ------------------------------------------------------------ Info-bulle des non lus */
.utip { position: fixed; z-index: 1000; width: 300px; background: var(--chrome); color: #e8edf1; border-radius: var(--r-md); box-shadow: 0 14px 40px rgba(0,0,0,.3); padding: 12px 14px; font-size: 13.5px; pointer-events: none; }
.utip-title { font-family: var(--f-cond); font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.utip-sum strong { font-size: 22px; color: var(--signal); font-family: var(--f-cond); }
.utip-since { font-size: 12.5px; color: #d3d9e4; margin-top: 2px; }
.utip-list { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 6px; display: grid; gap: 4px; max-height: 260px; overflow: hidden; }
.utip-row { display: flex; align-items: center; gap: 8px; }
.utip-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.utip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utip-count { background: var(--signal); color: var(--ink); font-weight: 700; font-size: 12px; border-radius: 10px; padding: 0 7px; min-width: 22px; text-align: center; }
.utip-new { font-size: 11.5px; color: #9fe0c4; }
.utip-at { background: var(--danger); color: #fff; font-weight: 700; font-size: 11px; border-radius: 8px; padding: 0 5px; }
.utip-foot { margin-top: 8px; font-size: 11.5px; color: #98a4ad !important; }
.utip .muted { color: #b4c0c9; }

/* ------------------------------------------------------------ Dictée vocale */
.mic-btn.recording { background: var(--danger); border-color: var(--danger); color: #fff; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 0%, transparent); } }

/* ------------------------------------------------------------ Stockage et purge */
.admin-tabs { margin-left: auto; }
.storage-total strong { font-family: var(--f-cond); font-size: 34px; }
.sbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line-2); margin: 8px 0 10px; }
.sbar-part { display: block; height: 100%; }
.storage-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; }
.storage-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.storage-legend i.free { background: var(--line-2); box-shadow: inset 0 0 0 1px var(--line); }
.storage-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.storage-pct { margin-left: auto; font-family: var(--f-cond); font-size: 20px; font-weight: 600; padding: 0 10px; border-radius: 12px; }
.storage-pct.storage-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.storage-pct.storage-warn { background: color-mix(in srgb, var(--signal) 25%, var(--surface)); color: var(--ink-ochre); }
.storage-pct.storage-crit { background: var(--tint-red); color: #b2453a; }
.hbars { display: grid; gap: 10px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 3px; }
.hbar-track { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
table.list.kv { min-width: 0; width: 100%; }
.admin-grid { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.card.wide-card { min-width: 0; overflow-x: auto; }
table.kv td.num, table.kv th.num { text-align: right; white-space: nowrap; }
.purge-card { max-width: 820px; }
.purge-cats { display: grid; gap: 8px; margin: 6px 0 4px; }
.purge-cat { font-weight: 400; }
.purge-list { margin: 8px 0 0; padding-left: 20px; }
.purge-result { margin-top: 12px; }
.purge-confirm { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.purge-confirm input { flex: 1 1 240px; }

/* ------------------------------------------------------------ En-tête compact du planning (une seule ligne) */
.pl-head.compact { padding: 8px 16px; gap: 0; margin-bottom: 6px; }
.pl-head.compact .pl-row { gap: 8px 10px; flex-wrap: wrap; }
.pl-head.compact .period { font-size: 20px; margin: 0 6px 0 2px; white-space: nowrap; cursor: default; }
.pl-head.compact .nav-btn { min-height: 30px; min-width: 30px; }
.pl-head.compact .nav-btn.today { padding: 0 10px; font-size: 13.5px; }
.pl-head.compact .pill-seg button { min-height: 28px; padding: 0 10px; font-size: 13.5px; }
.pl-head.compact .tool-group { padding: 2px; }
.pl-head.compact .tool { min-height: 30px; padding: 0 8px; gap: 5px; }
.pl-head.compact .tool-lbl { display: none; }
.pl-head.compact .conflict-btn { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.pl-head.compact .btn-new { min-height: 34px; padding: 0 12px; border-radius: 9px; box-shadow: none; }
.pl-head.compact .btn-new .tool-lbl { display: inline; }
.pl-head.compact .caret { margin-left: -2px; }
/* sur grand écran, on remet les libellés des réglages d'affichage */
@media (min-width: 1750px) { .pl-head.compact .tg-display .tool-lbl { display: inline; } }
.pl-head.compact .conflict-btn .lbl { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1600px) { .pl-head.compact .conflict-btn.none .lbl { display: none; } .pl-head.compact .period { font-size: 18px; } }
@media (max-width: 1650px) { .pl-head.compact .btn-new .tool-lbl { display: none; } .pl-head.compact .btn-new { padding: 0 10px; } }
@media (max-width: 1600px) {
  .pl-head.compact { padding: 7px 12px; }
  .pl-head.compact .pl-row { gap: 6px; }
  .pl-head.compact .period { font-size: 17px; margin: 0 2px; }
  .pl-head.compact .pill-seg button { padding: 0 8px; font-size: 13px; }
  .pl-head.compact .nav-btn.today { padding: 0 8px; font-size: 13px; }
  .pl-head.compact .tool { padding: 0 6px; }
  .pl-head.compact .conflict-btn { padding: 0 8px; }
}
.tool.has-filters { color: var(--blue-dark); }
.tool.has-filters svg { color: var(--blue); }
.tool[aria-pressed=true].has-filters svg { color: #fff; }
.fbadge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--blue-fill); color: #fff; font-size: 11px; font-weight: 700; }
.pl-head.compact ~ .filterbar { padding: 0 16px 8px; }
/* le planning occupe toute la hauteur restante de l'écran (en-tête, filtres et plein écran compris), sans vide en bas */
.main.main-fill { height: 100vh; height: 100dvh; }
.main.main-fill > .board, .main.main-fill > .pl-head ~ .board, .main.main-fill > .pl-head.compact ~ .filterbar ~ .board { flex: 1 1 auto; min-height: 0; max-height: none; margin-bottom: 10px; }
/* dates en lignes et vue mois : hauteur minimale posée par fitBoard() (hauteur visible du planning) ; les lignes « auto »
   se partagent l'espace libre, l'en-tête garde sa hauteur ; s'il y a plus de contenu que de place, défilement normal */
.main.main-fill .board > .tp { grid-template-rows: min-content; grid-auto-rows: auto; }
.main.main-fill .board > .month:not(.tp) { display: flex; flex-direction: column; }
.main.main-fill .board > .month:not(.tp) > .month-grid { flex: 1 0 auto; grid-auto-rows: auto; }
.pop-pad { padding: 4px 8px 2px; }
.pop-help { margin: 4px 8px 8px; font-size: 12px; color: var(--muted); max-width: 300px; }
@media (max-width: 860px) {
  .pl-head.compact .period { flex: 1 0 100%; order: -1; font-size: 19px; }
  .pl-head.compact ~ .board { max-height: none; }
  .main.main-fill { height: auto; }
  .main.main-fill > .board, .main.main-fill > .pl-head ~ .board, .main.main-fill > .pl-head.compact ~ .filterbar ~ .board { flex: none; margin-bottom: 16px; }
}

/* ------------------------------------------------------------ Membres d'une équipe (éditeur en deux volets) */
.res-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Ressources par onglets et N° de ressource (1.00.0) */
.res-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin-bottom: 10px; }
.res-tabs button { display: inline-flex; align-items: center; gap: 4px; }
.res-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.res-tab-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.res-tabs button[aria-pressed="true"] .res-tab-n { background: var(--signal); color: #fff; }
.res-intro { margin: 0 0 12px; max-width: 900px; }
.res-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.res-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.res-chip span { font-weight: 700; color: var(--ink); }
.res-chip.on { border-color: var(--signal); background: color-mix(in srgb, var(--signal) 10%, var(--surface)); color: var(--ink); }
.res-chip.warn span { color: var(--ink-red); }
.res-no { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--ink-2);
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; font-weight: 700; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.res-no.big { margin-left: 0; font-size: 13px; line-height: 22px; padding: 0 8px; }
.res-who { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.res-who .member-av { width: 30px; height: 30px; font-size: 12px; }
.res-acc { display: inline-flex; align-items: center; gap: 8px; }
.res-acc .fd-avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.chip.res-mem { cursor: pointer; border: 0; font: inherit; }
.res-acc.off { color: var(--muted); }
.res-acc.off .fd-avatar { filter: grayscale(1); opacity: .6; }
.res-link-btn { margin-left: auto; }
.tm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.tm-col { display: grid; grid-template-rows: auto 1fr; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; background: var(--surface-2); }
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tm-head strong { font-family: var(--f-cond); font-size: 17px; }
.tm-count { background: var(--press); color: #fff; border-radius: 10px; padding: 0 8px; font-weight: 700; font-size: 12px; }
.tm-tabs button { min-height: 28px; padding: 0 10px; font-size: 13px; }
.tm-list, .tm-avail { display: grid; gap: 4px; align-content: start; max-height: 300px; overflow: auto; }
.tm-card, .tm-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); min-width: 0; }
.tm-card.warn { border-color: var(--signal); background: var(--tint-cream); }
.tm-row { cursor: pointer; font-weight: 400; font-size: 14px; }
.tm-row:hover { border-color: var(--line); }
.tm-row.on { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 7%, var(--surface)); }
.tm-who { flex: 1; min-width: 0; }
.tm-who .nm { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-card .member-av, .tm-row .member-av, .dup-row .member-av { width: 28px; height: 28px; font-size: 11px; }
.tm-x { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; flex: none; }
.tm-x svg { width: 14px; height: 14px; }
.tm-x:hover { background: var(--tint-red); color: var(--danger); }
.tm-badge { flex: none; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.tm-badge.move { background: var(--tint-orange); color: var(--ink-orange); }
.tm-badge.free { background: var(--tint-green); color: var(--ok); }
.tm-badge.new { background: var(--tint-blue); color: var(--blue-dark); }
.tm-badge.dup { background: var(--signal); color: var(--ink); }
.tm-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.tm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tm-tools input[type=search] { flex: 1 1 200px; min-height: 34px; }
.tm-all { font-size: 13px; padding: 2px 4px; }
.tm-pane { display: grid; gap: 8px; align-content: start; }
.tm-pane textarea { min-height: 110px; font-family: inherit; }
.tm-actions { display: flex; justify-content: flex-end; }
.warn-text { color: var(--ink-ochre); font-weight: 600; }
@media (max-width: 860px) { .tm, .res-form { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Import des équipes */
.imp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.imp-kpis > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; background: var(--surface); border-top: 4px solid var(--ok); font-size: 13.5px; }
.imp-kpis > div.warn { border-top-color: var(--signal); }
.imp-kpis strong { font-family: var(--f-cond); font-size: 26px; }
.imp-kpis span { display: block; color: var(--muted); font-size: 12.5px; }
td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* ------------------------------------------------------------ Affaires : recherche et pagination */
.proj-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.proj-tools .proj-search, .proj-tools .res-search { flex: 1 1 280px; max-width: 460px; }
.pp.act-proj-filter { width: 340px; max-width: 100%; }
.act-code { font-weight: 600; }
.proj-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.tl-group-hint { font-weight: 400; font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; }
td.mail-cell { font-size: 13px; word-break: break-all; min-width: 160px; }

/* ------------------------------------------------------------ Sélecteur d'affaire avec recherche */
.pp { position: relative; }
.pp-field { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 0 4px 0 8px; }
.pp-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.pp-field .pp-input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding-left: 0; background: transparent; }
.pp-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pp-clear { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex: none; }
.pp-clear:hover { background: var(--surface-2); color: var(--ink); }
.pp.disabled .pp-field { background: var(--surface-2); }
.pp-list { position: fixed; z-index: 1000; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(42,54,81,.22); padding: 4px; }
.pp-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; line-height: 1.3; }
.pp-item .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; margin-top: 4px; }
.pp-item strong { font-weight: 600; }
.pp-item.active, .pp-item:hover { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); }
.pp-item.current { box-shadow: inset 3px 0 0 var(--blue); }
.pp-txt { min-width: 0; }
.pp-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-none { color: var(--muted); font-style: italic; }
.pp-more { padding: 6px 10px; font-size: 12.5px; }

/* ------------------------------------------------------------ Choix des ressources : recherche */
.res-pick-wrap { display: grid; gap: 6px; }
.res-pick-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.res-pick-tools .res-pick-search { flex: 1 1 240px; min-width: 0; }
.res-pick-tools label.check.res-pick-only { font-size: 13px; font-weight: 400; min-height: 0; }
.res-pick-count { font-size: 12.5px; color: var(--muted); }
.btn.btn-xs { min-height: 26px; padding: 0 8px; font-size: 12.5px; }
.btn.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13.5px; }

/* ------------------------------------------------------------ Messagerie : médias d'un fil */
.media-btn[aria-pressed=true] { background: color-mix(in srgb, var(--blue) 12%, var(--surface)); color: var(--blue-dark); }
.media-panel { flex: 1; min-height: 0; overflow: auto; padding: 12px 20px 16px; }
.media-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.media-tools input[type=search] { flex: 1 1 200px; max-width: 340px; }
.media-title { font-family: var(--f-cond); font-size: 16px; font-weight: 600; color: var(--ink-2); margin: 14px 0 8px; }
.media-title:first-child { margin-top: 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.media-tile { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.media-tile.is-video { cursor: pointer; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.media-tile:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.media-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.media-heic { display: grid; place-items: center; height: 100%; font-family: var(--f-cond); font-weight: 700; color: var(--muted); }
.media-docs { display: grid; gap: 6px; }
.media-doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.media-doc .ext { font-family: var(--f-cond); font-weight: 700; font-size: 13px; padding: 6px; border-radius: 3px; background: var(--chrome); color: #fff; min-width: 46px; text-align: center; flex: none; }
.media-doc-txt { flex: 1; min-width: 0; }
.media-doc .fn { display: block; font-weight: 500; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-doc .fn:hover { text-decoration: underline; }
.media-doc .fs { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .media-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } .media-btn { padding: 0 8px; } }

/* ------------------------------------------------------------ Messagerie : nouvelle discussion */
.channels-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.new-disc { min-height: 120px; }

/* ------------------------------------------------------------ Contrôle des doublons */
.dup-btn.has { border-color: var(--signal); background: var(--tint-yellow); font-weight: 600; }
.dup-tag { margin-left: 8px; border: 0; background: var(--signal); color: var(--ink); font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 7px; cursor: pointer; }
tr.dup-line td { background: var(--tint-cream); }
.dup-body { display: grid; gap: 12px; }
.dup-group { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 6px; border-left: 4px solid var(--signal); }
.dup-group.multi { border-left-color: var(--danger); }
.dup-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dup-title strong { font-family: var(--f-cond); font-size: 18px; }
.dup-flag { font-size: 12.5px; font-weight: 700; color: var(--danger); }
.dup-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-weight: 400; cursor: pointer; }
.dup-row .btn { min-height: 28px; font-size: 12.5px; }
.dup-actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------ Choix des affaires du prévisionnel */
.fc-add { margin-left: 12px; vertical-align: middle; min-height: 32px; font-size: 13.5px; }
.fc-remove { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: 0; flex: none; }
.fc-remove svg { width: 14px; height: 14px; }
tr:hover .fc-remove, .fc-remove:focus-visible { opacity: 1; }
.fc-remove:hover { background: var(--tint-red); color: var(--danger); }
@media (pointer: coarse) { .fc-remove { opacity: 1; } }
.pick-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pick-tools input[type=search] { flex: 1 1 260px; }
.pick-tools select { width: auto; }
.pick-bulk { display: flex; gap: 4px; margin-bottom: 6px; }
.pick-bulk .btn { min-height: 30px; font-size: 13px; }
.pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-weight: 400; font-size: 14px; cursor: pointer; }
.pick-row:hover { background: var(--surface-2); }
.pick-row.on { background: color-mix(in srgb, var(--blue) 7%, var(--surface)); }
.pick-row .swatch { margin: 0; flex: none; }
.pick-code { font-family: var(--f-cond); font-weight: 600; min-width: 80px; color: var(--ink-2); }
.pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row mark { background: var(--tint-hl); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ------------------------------------------------------------ Vue inversée (dates en lignes) */
/* largeur des colonnes pilotée par la densité : la grille remplit l'écran puis défile au-delà */
.tp { --tp-first: 96px; --tp-col: 180px; display: grid; grid-template-columns: var(--tp-first) repeat(var(--cols), minmax(var(--tp-col), 1fr));
  width: 100%; min-width: calc(var(--tp-first) + var(--cols) * var(--tp-col)); }
.tp .task { min-width: 0; }
.tp-corner { position: sticky; top: 0; left: 0; z-index: 6; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; font-size: 12px; color: var(--muted); display: grid; align-content: end; gap: 2px; }
.tp-corner span { font-size: 11px; }
.tp-colhead { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-2); padding: 8px 10px; display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.tp-colhead .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; margin-top: 5px; }
.tp-colhead .nm { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-colhead .sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-colhead > div { flex: 1; }
.tp-count { flex: none; font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--paper); border-radius: 9px; padding: 1px 7px; margin-top: 2px; }
.tp-rowhead { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2); padding: 6px 10px; display: grid; align-content: start; }
.tp-rowhead .dow { font-size: 12px; color: var(--muted); }
.tp-rowhead .dnum { font-family: var(--f-cond); font-size: 22px; font-weight: 600; line-height: 1.05; }
.tp-rowhead .dnum small { font-family: var(--f-body); font-size: 11px; font-weight: 500; color: var(--muted); }
.tp.day .tp-rowhead .dow { font-family: var(--f-cond); font-size: 16px; font-weight: 600; color: var(--ink-3); }
.tp-rowhead.today { box-shadow: inset 4px 0 0 var(--signal); }
.tp-rowhead.weekend, .tp-cell.weekend { background-color: var(--surface-2); }
.tp-cell { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 70px; min-width: 0; }
.tp.month .tp-cell { min-height: 46px; }
.tp.day .tp-cell { min-height: 52px; }
.tp-cell.today { background-color: color-mix(in srgb, var(--signal) 8%, var(--surface)); }
.tp-cell.can-edit { cursor: cell; }
.tp-cell.can-edit:hover { background-color: color-mix(in srgb, var(--blue) 4%, var(--surface)); }
.tp-cell .task { margin: 0; padding: 3px 7px 3px 8px; border-left-width: 4px; }
.tp-cell .task .t1 { font-size: 13px; }
.tp-cell .task .t2 { font-size: 11.5px; }
.tp-cell { position: relative; user-select: none; }
.tp-cell.cell-sel { background-color: color-mix(in srgb, var(--blue) 14%, var(--surface)) !important; box-shadow: inset 0 0 0 2px var(--blue); }
.cell-sel-tag { position: absolute; top: 3px; left: 3px; z-index: 2; pointer-events: none; background: var(--blue-fill); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tp-cell .task.cont { opacity: .55; border-left-style: dotted; }
.tp-cell .task.cont .t1::before { content: "↳ "; color: var(--muted); }

/* ------------------------------------------------------------ Filtres multiples et vues */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0 22px 10px; }
.filter-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-right: 2px; }
.filterbar .spacer { flex: 1; }
.filter-btn, .filterbar .pop-btn { min-height: 34px; padding: 0 10px; font-size: 14px; gap: 6px; }
.filter-btn.active { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--surface)); color: var(--blue-dark); }
.fcount { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--blue-fill); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.caret { font-size: 10px; color: var(--muted); }
.pop { position: fixed; z-index: 960; min-width: 260px; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 14px 40px rgba(42,54,81,.22); padding: 6px; }
.pop input[type=search] { min-height: 34px; margin-bottom: 4px; font-size: 14px; }
.pop-tools { display: flex; gap: 4px; padding: 4px 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.pop-tools .btn { min-height: 30px; font-size: 13px; padding: 0 10px; }
.pop .pop-tools:last-child { border-bottom: 0; border-top: 1px solid var(--line-2); margin: 4px 0 0; padding-top: 8px; }
.pop-list { max-height: 320px; overflow: auto; }
.pop-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 8px 2px; }
.pop-item { padding: 5px 8px; border-radius: var(--r-sm); font-size: 14px; font-weight: 400; cursor: pointer; }
.pop-item:hover { background: var(--surface-2); }
.pop-item .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.view-item { display: flex; align-items: center; gap: 2px; border-radius: var(--r-sm); }
.view-item.current { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.view-item:hover { background: var(--surface-2); }
.view-apply { flex: 1; display: grid; text-align: left; border: 0; background: transparent; padding: 6px 8px; cursor: pointer; min-width: 0; }
.view-apply strong { font-weight: 600; font-size: 14px; }
.view-apply .muted { font-size: 12px; }
.view-item .btn-icon { width: 30px; min-height: 30px; }

/* ------------------------------------------------------------ Absences */
.task.absence { --c: #6b7a86; }
.task.absence.abs-validee { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0 7px, color-mix(in srgb, var(--c) 22%, var(--surface)) 7px 14px); border-style: solid; }
.task.absence.abs-en_attente { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, color-mix(in srgb, var(--c) 10%, var(--surface)) 7px 14px); border-style: dashed; border-left-style: dashed; opacity: .92; }
.task.absence.abs-refusee { opacity: .4; text-decoration: line-through; }
.abs-flag { margin-right: 4px; }
.abs-pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.abs-pill-validee { background: var(--tint-green); color: var(--ok); }
.abs-pill-en_attente { background: var(--tint-hl); color: var(--ink-ochre); }
.abs-pill-refusee { background: var(--tint-red); color: var(--danger); }
.abs-pending-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.abs-pending-bar .spacer { flex: 1; }
.abs-table td { vertical-align: top; }
.sector { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.sector-travaux { background: var(--tint-orange); color: var(--ink-orange); }
.sector-service { background: var(--tint-blue); color: var(--blue-dark); }
.import-src { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 10px; align-items: start; margin-bottom: 10px; }
.import-map { margin-bottom: 10px; }
.import-report p { margin: 6px 0; }

/* ------------------------------------------------------------ Équipes déployées */
.team-toggle { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; padding: 0; color: var(--ink-3); }
.team-toggle:hover { border-color: var(--ink-3); color: var(--ink); }
.team-toggle svg { width: 14px; height: 14px; transition: transform .15s; }
.team-toggle.open svg { transform: rotate(90deg); }
.team-toggle.open { background: var(--press); border-color: var(--press); color: #fff; }
.tl-label .dot.inline { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; }
.tl-row.team-open { border-bottom-color: var(--line); }
.member-row .tl-label { padding-left: 30px; background: var(--surface-2); }
.member-row .tl-track { background-color: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.member-row .tl-label .nm { font-weight: 500; font-size: 14px; }
.member-av { flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-family: var(--f-cond); }
.member-row:last-of-type { border-bottom: 1px solid var(--line); }
.res-pick-team { display: grid; }
.res-pick-members { display: flex; flex-wrap: wrap; gap: 0 12px; padding-left: 26px; border-left: 2px solid var(--line-2); margin: 0 0 4px 7px; }
.res-pick label.check.sub { font-size: 13px; color: var(--ink-2); min-height: 22px; }

/* ------------------------------------------------------------ Suppression en masse */
.mass-filters { margin-bottom: 10px; }
.mass-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.mass-list > p { padding: 12px; margin: 0; }
.mass-table { min-width: 0; font-size: 13.5px; }
.mass-table td, .mass-table th { padding: 6px 10px; }
.mass-table .nowrap, .nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ Administration */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.card.wide-card { max-width: none; }
.card .full-span, .full-span { grid-column: 1 / -1; }
.card label.check { align-items: flex-start; margin-bottom: 10px; line-height: 1.4; }
.card label.check input { margin-top: 3px; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0 auto 0 0; }
.admin-actions { display: flex; gap: 8px; margin-top: 14px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.presets .btn { min-height: 30px; font-size: 13px; padding: 0 10px; border: 1px dashed var(--line); }
.test-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.test-row label { flex: 1 1 220px; }
.ok-text { color: var(--ok); font-weight: 600; margin: 6px 0 0; }
.err-text { color: var(--danger); font-weight: 600; margin: 6px 0 0; }
.small { font-size: 12.5px; }

/* ------------------------------------------------------------ Sélection rapide (planning) */
.lasso { position: fixed; z-index: 830; pointer-events: none; border: 2px dashed var(--ink); background: color-mix(in srgb, var(--signal) 18%, transparent); border-radius: 3px; }
.sel-hint { font-size: 14px; color: var(--ink-2); }
.btn-del-sel { font-weight: 600; }

/* ------------------------------------------------------------ Discussions : ordre et vue d'ensemble */
.seg-sm button { min-height: 30px; padding: 0 10px; font-size: 13px; }
.channel-all { border-bottom: 1px solid var(--line-2); border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: 4px; }
.channel-all .cn { font-weight: 600; }
.order-btn { font-size: 13px; min-height: 32px; padding: 0 10px; }
.chan-ref { border: 0; border-left: 3px solid var(--c, var(--ink-3)); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 3px; cursor: pointer; }
.chan-ref:hover { background: var(--line-2); }
.composer-note { font-size: 13.5px; padding: 14px 16px; }

/* ------------------------------------------------------------ Rôles */
.roles-help { margin: 16px 0 0; max-width: none; }
.roles-help summary { cursor: pointer; font-family: var(--f-head); font-size: 15px; font-weight: 700; }
.roles-help[open] summary { margin-bottom: 12px; }
/* Utilisateurs : chiffres clés, onglets, tableau compact */
.users-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.users-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.users-kpi:hover { border-color: var(--blue); }
.users-kpi strong { font-family: var(--f-head); font-size: 26px; font-weight: 800; line-height: 1.15; }
.users-kpi-l { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
#users-body > .users-card, #users-body > .roles-help { max-width: none; width: 100%; }
.users-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.users-q { width: min(340px, 100%); }
.users-who { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.users-who .fd-avatar { width: 34px; height: 34px; flex: none; font-size: 13px; }
.users-who-t { min-width: 0; }
.users-who-t .beta-chip, .users-who-t .pn-tag { margin-left: 6px; }
.users-mail { overflow-wrap: anywhere; }
.users-row.disabled td, .users-row.deleted td { color: var(--muted); }
.users-row.disabled .fd-avatar, .users-row.deleted .fd-avatar { filter: grayscale(1); opacity: .6; }
.users-row.deleted strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.users-table td { vertical-align: middle; }
.users-note { margin: 12px 0 0; }
.users-empty { padding: 12px 0; }
/* sélection, actions en masse, comptes importés à inviter (0.97.0) */
.users-cb { width: 34px; text-align: center; }
.users-cb input { width: 17px; height: 17px; accent-color: var(--signal); cursor: pointer; }
.users-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 12px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--signal) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--signal) 35%, var(--line)); }
.users-bulk[hidden] { display: none; }
.users-bulk-g { display: inline-flex; align-items: center; gap: 6px; }
.users-bulk select { min-height: 30px; padding: 2px 8px; font-size: 13px; max-width: 190px; }
.users-row.invite-wait td { color: var(--ink-3); }
.pill.invite { background: color-mix(in srgb, var(--signal) 14%, var(--surface)); color: var(--ink-orange); }
.users-pending-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-left-color: var(--signal); }
.users-pending-note > div:first-child { flex: 1 1 320px; }
.users-pending-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-names { max-height: 140px; overflow: auto; }
.imp-src { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.imp-box textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.imp-svc { margin: 12px 0; max-width: 320px; }
.imp-table { max-height: 320px; overflow: auto; margin-bottom: 12px; }
.imp-skip td { color: var(--muted); }
.imp-bad { color: var(--ink-red); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; border-top: 4px solid var(--line); }
.role-card.member { border-top-color: var(--ink-3); }
.role-card.planner, .role-card.profile { border-top-color: var(--blue); }
.pill.profile { background: var(--tint-blue); color: var(--blue-dark); }
.r-prof { font-size: 12px; font-weight: 600; color: var(--blue-dark); white-space: nowrap; }
/* fenêtre « PDF du planning » */
.pdf-sum { background: var(--line-2); border-radius: var(--r-md); padding: 10px 12px; }
.pdf-sum strong { display: block; margin-bottom: 2px; }
.pdf-opt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdf-opt-l { font-weight: 600; font-size: 14px; }
.role-card.admin { border-top-color: var(--ink); }
.role-card p { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.pill.member { background: var(--line-2); }
.roles-table td.c { text-align: center; width: 130px; }
.roles-table th:not(:first-child) { text-align: center; }
.r-yes { color: var(--ok); font-weight: 700; }
.r-no { color: var(--muted-2); }

/* ------------------------------------------------------------ Journal d'activité */
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.filters label { font-size: 12.5px; }
.filters input, .filters select { min-height: 36px; width: auto; min-width: 140px; font-size: 14px; }
.filters .grow { flex: 1 1 200px; }
.filters .grow input { width: 100%; }
.log-count { font-size: 13px; margin: 0 0 6px; }
.log-table td { vertical-align: top; font-size: 13.5px; }
.log-table .nowrap { white-space: nowrap; }
.log-table .small { font-size: 12px; }
.log-detail { min-width: 320px; }
.log-detail .chg { margin-bottom: 3px; overflow-wrap: anywhere; }
.log-detail .chg strong { font-weight: 600; color: var(--ink-2); }
.log-detail .old { background: var(--tint-red); color: var(--ink-red); padding: 0 4px; border-radius: 3px; text-decoration: line-through; text-decoration-color: rgba(155,44,36,.4); }
.log-detail .new { background: var(--tint-green); color: var(--ink-green); padding: 0 4px; border-radius: 3px; }
#log-list.loading { opacity: .55; transition: opacity .15s; }
.log-proj { min-width: 260px; }
/* journal sur téléphone : une carte par opération (le tableau à 5 colonnes débordait) */
@media (max-width: 860px) {
  .log-proj { min-width: 0; flex: 1 1 100%; }
  .log-table thead { display: none; }
  .log-table, .log-table tbody, .log-table tr, .log-table td { display: block; width: 100%; }
  .log-table tr { border-bottom: 1px solid var(--line); padding: 8px 2px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
  .log-table td { border: 0; padding: 0; }
  .log-table td:nth-child(1) { grid-column: 1; display: flex; gap: 6px; }
  .log-table td:nth-child(2) { grid-column: 2; text-align: right; }
  .log-table td:nth-child(2) .small { display: none; }
  .log-table td:nth-child(n+3) { grid-column: 1 / -1; }
  .log-detail { min-width: 0; margin-top: 4px; }
}
.op { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.op-create { background: var(--tint-green); color: var(--ink-green); }
.op-update { background: var(--tint-blue); color: var(--blue-dark); }
.op-delete { background: var(--tint-red); color: var(--danger); }
.op-close { background: var(--tint-green); color: var(--ok); }
.op-reopen { background: var(--tint-orange); color: var(--ink-orange); }
.load-more { display: block; margin: 12px auto; }

/* ------------------------------------------------------------ Mentions */
.composer { position: relative; }
.mention-btn { font-weight: 700; font-size: 17px; }
.mention-list {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% - 4px); z-index: 20; max-height: 260px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(42,54,81,.22); padding: 4px;
}
.mention-item { display: grid; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; }
.mention-item strong { font-weight: 600; }
.mention-item span { font-size: 12px; color: var(--muted); }
.mention-item.active, .mention-item:hover { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); }
.mention { display: inline-block; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue-dark); font-weight: 600; }
.mention.me { background: var(--signal); color: var(--ink); }
.msg.mentioned .bubble { border-left: 3px solid var(--signal); padding-left: 8px; }
.badge-mention { background: var(--danger); color: #fff; }
.task-ref { display: inline-block; border: 0; background: var(--line-2); color: var(--ink-2); font-size: 12px; padding: 1px 8px; border-radius: 10px; margin: 0 0 4px; cursor: pointer; }
.task-ref:hover { background: var(--line); }

/* ------------------------------------------------------------ Choix de plusieurs ressources */
.field { display: grid; gap: 5px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.res-pick { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px 10px; max-height: 240px; overflow: auto; background: var(--surface); }
.res-pick-group { font-family: var(--f-cond); font-weight: 600; font-size: 14px; color: var(--ink-3); margin: 8px 0 4px; }
.res-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; }
.res-pick label.check { font-size: 14px; font-weight: 400; min-height: 30px; }
.res-pick .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ------------------------------------------------------------ Menu contextuel */
.ctx-menu { position: fixed; z-index: 1050; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 14px 40px rgba(42,54,81,.25); padding: 4px; }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
.ctx-item:hover, .ctx-item:focus-visible { background: var(--surface-2); }
.ctx-item svg { width: 17px; height: 17px; color: var(--ink-3); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger svg { color: var(--danger); }

/* ------------------------------------------------------------ Version et nouveautés */
.version-link { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; color: #8fa0ad; font-size: 12px; cursor: pointer; text-align: left; }
.version-link:hover { color: var(--signal); text-decoration: underline; }
.changelog h3 { font-size: 19px; margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.changelog h3:first-of-type { border-top: 0; padding-top: 0; }
.changelog ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.changelog p { margin: 0 0 6px; font-size: 13px; }

/* ------------------------------------------------------------ Personnes */
.section-title { font-size: 22px; margin: 28px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12.5px; background: var(--paper); border: 1px solid var(--line-2); }
.members-pick { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.members-title { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.members-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 220px; overflow: auto; }
.members-list label.check { font-size: 14px; font-weight: 400; }

/* ------------------------------------------------------------ Mois */
.month { min-width: 720px; }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.month-head div { padding: 8px 10px; font-size: 12px; color: var(--muted); font-weight: 500; }
.mcell { min-height: 124px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px 4px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell.out { background: var(--surface-2); }
.mcell.out .mnum { color: var(--muted-2); }
.mcell.weekend:not(.out) { background: var(--weekend); }
.mnum { font-family: var(--f-cond); font-size: 18px; font-weight: 600; padding: 0 6px 2px; display: flex; align-items: center; gap: 6px; }
.mcell.today .mnum::after { content: ""; flex: 1; height: 4px; background: var(--hazard); border-radius: 1px; max-width: 46px; }
.mcell .task { margin: 0; padding: 2px 6px 2px 7px; border-left-width: 3px; min-height: 24px; }
.mcell .task .t1 { font-size: 12.5px; font-weight: 500; }
.mcell .task .t2 { display: none; }
.more { border: 0; background: transparent; color: var(--blue); font-size: 12.5px; text-align: left; padding: 2px 6px; cursor: pointer; }

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

/* ------------------------------------------------------------ Modale */
.overlay { position: fixed; inset: 0; z-index: 900; background: rgba(42,54,81,.48); display: grid; place-items: center; padding: 16px; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-md); box-shadow: 0 24px 60px rgba(42,54,81,.35); }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 24px; margin-right: auto; }
.modal-body { padding: 10px 20px 18px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line-2); }
.modal-foot .spacer { flex: 1; }
.conflict-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; background: var(--tint-yellow); border-radius: var(--r-sm); border: 1px solid #f0d77a; font-size: 14px; }
.conflict-note::before { content: ""; flex: none; width: 14px; align-self: stretch; min-height: 18px; background: var(--hazard); border-radius: 2px; }

.clist { display: grid; gap: 10px; }
.citem { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); text-align: left; width: 100%; }
.citem:hover { border-color: var(--ink-3); }
.citem .hzbar { background: var(--hazard); border-radius: 2px; }
.citem .cres { font-weight: 600; }
.citem .cpair { font-size: 13.5px; color: var(--ink-3); }

/* ------------------------------------------------------------ Toasts */
#toasts { position: fixed; z-index: 1100; right: 18px; bottom: calc(18px + var(--safe-b)); display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--chrome); color: #fff; padding: 12px 14px; border-radius: var(--r-sm); box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 12px; align-items: center; font-size: 14px; }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--chrome); border-left: 10px solid var(--signal); }
.toast .btn { min-height: 30px; padding: 0 10px; background: transparent; color: #fff; border-color: rgba(255,255,255,.4); margin-left: auto; }

/* ------------------------------------------------------------ Tables admin */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; }
table.list { width: 100%; border-collapse: collapse; min-width: 640px; }
table.list th, table.list td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list th { font-size: 12.5px; color: var(--muted); font-weight: 500; background: var(--surface-2); }
table.list tr:last-child td { border-bottom: 0; }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list tr.inactive td { color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 8px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; background: var(--line-2); color: var(--ink-2); }
.pill.admin { background: var(--press); color: #fff; }
.pill.planner { background: var(--tint-blue); color: var(--blue-dark); }
.pill.off { background: var(--tint-red); color: var(--danger); }
.temp-pw { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; padding: 12px; background: var(--surface-2); border: 1px dashed var(--ink-3); border-radius: var(--r-sm); text-align: center; letter-spacing: .06em; user-select: all; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; max-width: 520px; }
.card h2 { font-size: 20px; margin-bottom: 12px; }

/* ------------------------------------------------------------ Chat */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 0px); min-height: 0; }
.channels { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.channels-head { padding: 18px 16px 10px; }
.channels-head h1 { font-size: 26px; }
.channel-list { overflow: auto; padding: 4px 8px 16px; }
.channel { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 10px; border-radius: var(--r-sm); cursor: pointer; }
.channel:hover { background: var(--surface-2); }
.channel[aria-current=true] { background: var(--paper); }
.channel .dot { width: 10px; height: 10px; border-radius: 3px; }
.channel .cn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel .cd { font-size: 12px; color: var(--muted); }
.channel.unread .cn { font-weight: 700; }

.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.convo-head h2 { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-head .back { display: none; }
.msgs { flex: 1; overflow: auto; padding: 16px 20px 12px; display: flex; flex-direction: column; gap: 0; }
.day-sep { align-self: center; margin: 12px 0 6px; font-size: 12px; color: var(--muted); background: var(--paper); padding: 2px 10px; border-radius: 10px; border: 1px solid var(--line-2); }
/* messages regroupés (1.04.0) : un bloc par auteur (nom et photo une fois), lignes resserrées, survol discret */
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 3px 8px; margin: 6px -8px 0; max-width: 776px; border-radius: 8px; }
.msg:hover { background: var(--surface-2); }
.msg.cont { margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.msg.cont .meta { display: none; }
.msg .meta { margin-bottom: 0; }
/* outils d'un message : barre flottante en haut à droite, au survol seulement (ne réserve plus une ligne vide sous chaque message) */
.msg { position: relative; }
.msg > div > .msg-tools { position: absolute; top: -12px; right: 8px; z-index: 3; display: none; align-items: center; gap: 2px; flex-wrap: nowrap;
  padding: 2px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 8px rgba(42,54,81,.12); }
.msg:hover > div > .msg-tools, .msg > div > .msg-tools:focus-within { display: flex; }
.msg > div > .msg-tools .del, .msg > div > .msg-tools .quick-reacts { visibility: visible; }
.msgs > .msg:first-child > div > .msg-tools, .day-sep + .msg > div > .msg-tools, .chan-head + .msg > div > .msg-tools { top: 0; }
.msg-time { font-size: 11px; line-height: 22px; color: var(--muted); text-align: right; visibility: hidden; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg:hover .msg-time, .msg.picked .msg-time { visibility: visible; }
.msg.cont .atts, .msg.cont .reply-quote, .msg.cont .task-ref { margin-top: 2px; }
/* « Toutes les discussions » : un en-tête par fil, les messages du fil en dessous */
.chan-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 4px 8px 4px 0; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ink);
  font: inherit; font-weight: 700; font-size: 13px; text-align: left; cursor: pointer; max-width: 776px; }
.chan-head .chan-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.chan-head .chan-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chan-head .chan-go { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--muted); visibility: hidden; white-space: nowrap; }
.chan-head:hover .chan-go, .chan-head:focus-visible .chan-go { visibility: visible; }
.day-sep + .chan-head { margin-top: 2px; }
.avatar { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-family: var(--f-cond); font-weight: 600; color: #fff; font-size: 15px; }
.meta { font-size: 13px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 8px; align-items: baseline; }
.meta strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { color: var(--ink); }
.msg .del { visibility: hidden; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 4px; }
.msg:hover .del { visibility: visible; }
.atts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 6px; }
.att-img { display: block; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; padding: 0; }
.att-img img { display: block; max-width: 260px; max-height: 200px; object-fit: cover; }
.att-video { max-width: min(420px, 100%); border-radius: var(--r-sm); background: #000; display: block; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; color: var(--ink); max-width: 320px; }
.att-file .ext { font-family: var(--f-cond); font-weight: 700; font-size: 13px; padding: 6px 6px; border-radius: 3px; background: var(--chrome); color: #fff; min-width: 42px; text-align: center; }
.att-file .fn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file .fs { font-size: 12px; color: var(--muted); }
.load-older { align-self: center; margin-bottom: 10px; }

.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 10px 14px calc(10px + var(--safe-b)); }
.pending { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pending:empty { display: none; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; background: var(--paper); border-radius: 14px; font-size: 13px; max-width: 240px; }
.pchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip button { border: 0; background: transparent; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; }
.pchip button:hover { background: var(--line); }
/* zone de saisie façon messagerie (ordinateur et téléphone) : une bulle arrondie (😊, texte, 📎, @, 🎤) + bouton d'envoi rond */
.compose-row { display: flex; align-items: flex-end; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 24px; padding: 3px; transition: border-color .15s, box-shadow .15s; }
.compose-row:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.compose-row .btn-icon { width: 38px; min-width: 38px; height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 50%; flex: none; color: var(--ink-3, var(--muted)); }
.compose-row .btn-icon:not(.btn-primary):hover { background: var(--line-2); color: var(--ink); }
.compose-row .emoji-btn { order: 0; }
.compose-row textarea { order: 1; flex: 1 1 auto; min-width: 0; min-height: 40px; max-height: 160px; resize: none; padding: 9px 6px; font-size: 15px; line-height: 1.35; border: 0; background: transparent; box-shadow: none; outline: none; }
.compose-row textarea:focus { outline: none; box-shadow: none; border: 0; }
.compose-row > .btn-icon:not(.btn-primary):not(.emoji-btn) { order: 2; }
.compose-row .mic-btn.recording { background: var(--danger); color: #fff; }
.compose-row .btn-primary { order: 3; width: 40px; min-width: 40px; height: 40px; margin-left: 4px; background: var(--blue-fill); color: #fff; }
.compose-row .btn-primary:hover { filter: brightness(1.08); }
.compose-row .btn-primary:disabled { opacity: .55; }
.progress { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.progress div { height: 100%; width: 0; background: var(--blue); transition: width .15s; }
.dropzone { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 3px dashed var(--blue); font-family: var(--f-cond); font-size: 24px; font-weight: 600; color: var(--blue); pointer-events: none; }

.lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(10,15,20,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

.theme-seg { flex-wrap: wrap; }
/* actions nouvellement attribuées */
tr.act-new td { background: var(--tint-yellow); }
tr.act-new td:first-child { box-shadow: inset 4px 0 0 var(--signal); }
.new-pill { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }

/* ------------------------------------------------------------ Connexion avec Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; text-decoration: none;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 6px; font-weight: 600; font-size: 15px; }
.btn-google:hover { background: #f8f9fa; border-color: #1f1f1f; }
.g-logo { width: 20px; height: 20px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E") center / contain no-repeat; }
.g-hint { text-align: center; font-size: 12.5px; margin: 6px 0 0; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------ Jours fériés */
:root { --holiday: #7a5bb5; --holiday-bg: #f1edf8; }
.hol-name { display: block; font-size: 10.5px; line-height: 1.15; font-weight: 600; color: var(--holiday); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-body); }
.tl-unit.holiday { background: var(--holiday-bg); }
.tl-unit.holiday .dow, .tl-unit.holiday .dnum { color: var(--holiday); }
.tl-shade.holiday { background: repeating-linear-gradient(-45deg, var(--holiday-bg) 0 8px, var(--holiday-stripe) 8px 16px); }
.tl-corner.holiday { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px; }
.mcell.holiday:not(.out) { background: var(--holiday-bg); }
.mcell.holiday .mnum { color: var(--holiday); }
.mnum .hol-name { flex: 1; min-width: 0; }
.tp-rowhead.holiday, .tp-cell.holiday { background-color: var(--holiday-bg); }
.tp-rowhead.holiday .dow { color: var(--holiday); }
.hol-badge { display: inline-block; vertical-align: middle; margin-left: 12px; padding: 3px 10px; border-radius: 12px; background: var(--holiday-bg); color: var(--holiday); font: 600 13px/1.3 var(--f-body); }
.hol-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--holiday); flex: none; }
.notice.fc-hol { border-color: var(--holiday); background: var(--holiday-bg); font-size: 13.5px; }

/* ------------------------------------------------------------ Accueil */
.home-head h1 { font-size: 28px; }
.home-hello { margin: 2px 0 0; font-size: 13.5px; }
.page-body.home { padding-top: 16px; }
.home-date { min-width: 0; display: flex; flex-direction: column; margin-right: auto; }
.home-date h2 { font-size: 21px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.home-date .hol-badge { margin: 0; font-size: 12px; }
.home { display: grid; gap: 16px; }
.home-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.home-kpi { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .15s, transform .15s; }
.home-kpi:hover { box-shadow: 0 3px 10px rgba(42,54,81,.12); transform: translateY(-1px); }
.home-kpi .fc-kpi-value { font-size: 30px; }
.home-card { max-width: none; padding: 16px 18px; min-width: 0; }
.home-card .card-head { margin-bottom: 8px; }
.home-card .card-head h2 { font-size: 19px; margin-bottom: 0; display: flex; align-items: center; gap: 8px; }
.home-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--paper); color: var(--ink-2); font: 700 12.5px/1 var(--f-body); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.home-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.home-day { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 8px 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; min-width: 0; display: grid; gap: 1px; }
.home-day:hover { border-color: var(--blue); }
.home-day.weekend { background: var(--surface-2); }
.home-day.holiday { background: var(--holiday-bg); border-color: #d9cfee; }
.home-day.past { opacity: .62; }
.home-day.today { border: 2px solid var(--ink); padding: 7px 9px; }
.hd-dow { font-size: 12px; color: var(--muted); }
.hd-num { font: 600 22px/1.1 var(--f-cond); }
.hd-stat { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-stat strong { color: var(--ink); }
.hd-stat.abs strong { color: var(--ink-orange); }
.home-list { display: grid; }
.home-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--line-2); background: transparent; padding: 8px 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.home-row:first-child { border-top: 0; }
.home-row:hover:not(.static) { background: var(--surface-2); }
.home-row.static { cursor: default; }
.home-row .swatch { margin: 0; flex: none; }
.home-row .prio { width: 10px; height: 10px; padding: 0; border-radius: 50%; flex: none; }
.hr-main { flex: 1; min-width: 0; display: grid; }
.hr-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-time { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; flex: none; }
.hr-time.late { color: var(--danger); font-weight: 600; }
.hz-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--hazard); flex: none; }
.home-badge { flex: none; }
.home-empty { margin: 4px 0; font-size: 14px; }
.home-more { padding: 6px 4px 0; }
.home-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.home-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; background: var(--surface); }
.home-chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------ Notifications */
.notif-page { display: grid; gap: 16px; max-width: 860px; }
.notif-page .card { max-width: none; }
.notif-device h2 { font-size: 19px; margin-bottom: 8px; }
.install-guide { padding: 0; border-left: 4px solid var(--signal); }
.install-guide > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; font-family: var(--f-cond); font-size: 19px; font-weight: 600; list-style: none; }
.install-guide > summary::-webkit-details-marker { display: none; }
.install-guide > summary::after { content: "▾"; margin-left: auto; font-size: 14px; color: var(--muted); transition: transform .15s; }
.install-guide[open] > summary::after { transform: rotate(180deg); }
.install-guide > summary svg { width: 22px; height: 22px; color: var(--ink-3); }
.ig-hint { font-family: var(--f-body); font-weight: 400; }
.ig-steps { list-style: none; margin: 0; padding: 0 18px 4px; display: grid; gap: 12px; }
.ig-step { display: flex; gap: 12px; align-items: flex-start; }
.ig-step p { margin: 2px 0 0; font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.ig-num { width: 28px; height: 28px; border-radius: 50%; background: var(--chrome); color: var(--signal); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.ig-url { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; word-break: break-all; }
.ig-notes { margin: 12px 18px 16px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-md); font-size: 13.5px; color: var(--ink-3); }
.ig-notes p { margin: 0 0 6px; }
.nd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.nd-row:first-of-type { border-top: 0; }
.nd-row > span:first-child svg { width: 26px; height: 26px; color: var(--ink-3); flex: none; }
/* le texte garde une largeur lisible ; sur téléphone, les boutons passent dessous */
.nd-row > div:nth-child(2) { flex: 1 1 220px; min-width: 0; }
.nd-row > .btn, .nd-row > .nd-actions { margin-left: auto; }
.nd-row.ok > span:first-child svg { color: var(--ok); }
.nd-row.warn > span:first-child svg { color: var(--danger); }
.nd-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.nd-help { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.nd-help summary { cursor: pointer; color: var(--blue); }
.nd-help ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.nd-others { border-top: 1px solid var(--line-2); padding-top: 10px; display: grid; gap: 4px; }
.nd-dev { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.nd-dev .btn { margin-left: auto; }
.notif-card { padding: 8px 10px; }
.notif-day { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 8px 4px; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; border: 0; border-radius: var(--r-md); background: transparent; padding: 10px 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: color-mix(in srgb, var(--signal) 9%, var(--surface)); }
.notif-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--ink); font-weight: 800; font-size: 16px; flex: none; }
.notif-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.notif-title { font-weight: 600; line-height: 1.3; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-body { font-size: 13.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.notif-meta { font-size: 12px; color: var(--muted); }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; margin-top: 6px; }

/* ------------------------------------------------------------ Prévisionnel : prévu / planifié */
td.cmp { vertical-align: top; padding-top: 4px; padding-bottom: 3px; }
.fc-plan { font-size: 11.5px; line-height: 1.2; margin-top: 2px; min-height: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fc-plan.ok { color: var(--ok); }
.fc-plan.under { color: var(--ink-plan); }
.fc-plan.extra { color: var(--blue); }
.fc-plan.ok::before { content: "✓ "; }
.fc-plan.under::before { content: "▼ "; }
.fc-plan.extra::before { content: "+ "; }
.fc-leg-line.plan { border-top: 2px dashed var(--ink-plan); }
.fc-plan-line { fill: none; stroke: var(--ink-plan); stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.fc-plan-dot { fill: var(--surface); stroke: var(--ink-plan); stroke-width: 2; }
.fc-foot.plan td:first-child { color: var(--ink-plan); }
.fc-gap.warn { color: var(--ink-plan); background: var(--tint-orange); }
.fc-gap.info { color: var(--blue); }
.fc-kpi.plan { border-top-color: var(--ink-plan); }
table.fc-others td.num { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------ Mobile */
.tabbar { display: none; }
/* feuille « Menu » du téléphone : tout le menu (rubriques en tuiles, Docs et autres groupes dépliables) */
.mm-overlay { position: fixed; inset: 0; z-index: 950; background: rgba(13, 18, 32, .45); display: flex; align-items: flex-end; animation: mm-fade .15s ease-out; }
.mm-sheet { width: 100%; max-height: calc(100dvh - 24px); background: var(--paper, var(--surface)); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.25); animation: mm-up .2s ease-out; }
@keyframes mm-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes mm-fade { from { opacity: 0; } to { opacity: 1; } }
.mm-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px 18px; position: relative; }
.mm-head strong { flex: 1; font-size: 16px; }
.mm-grab { position: absolute; top: 5px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.mm-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px calc(14px + var(--safe-b, 0px)); display: grid; gap: 10px; }
.mm-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mm-search svg { width: 18px; height: 18px; }
.mm-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mm-me.current { border-color: var(--blue); }
.mm-me-t { flex: 1; display: grid; min-width: 0; }
.mm-go { color: var(--muted); font-size: 20px; }
.mm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mm-tile { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; line-height: 1.2; cursor: pointer; text-align: center; }
.mm-tile.current { border-color: var(--blue); background: var(--tint-blue); color: var(--blue-dark); }
.mm-tile-ico { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--line-2); color: var(--ink); }
.mm-tile.current .mm-tile-ico { background: var(--blue-fill); color: #fff; }
.mm-tile-ico svg { width: 22px; height: 22px; }
.mm-tile-ico .badge { position: absolute; top: -6px; right: -10px; }
.mm-tile .beta-chip { position: absolute; top: 6px; right: 6px; font-size: 9px; }
.mm-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mm-item, .mm-group > summary { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 14px 8px calc(14px + var(--d, 0) * 18px); border: 0; border-top: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.mm-list > :first-child, .mm-list > .mm-group:first-child > summary { border-top: 0; }
.mm-item svg, .mm-group > summary svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--ink-3); }
.mm-item.current { background: var(--tint-blue); color: var(--blue-dark); font-weight: 600; }
.mm-item.current svg { color: var(--blue); }
.mm-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mm-item .badge { position: static; }
.mm-group > summary { list-style: none; font-weight: 600; }
.mm-group > summary::-webkit-details-marker { display: none; }
.mm-n { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 10px; padding: 1px 7px; }
.mm-caret { color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.mm-group[open] > summary .mm-caret { transform: none; }
.mm-group[open] > summary { background: var(--line-2); }
.mm-version { justify-self: center; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; padding: 6px; cursor: pointer; }

@media (max-width: 860px) {
  :root { --label-w: 128px; --lane-h: 50px; }
  .shell { grid-template-columns: 1fr; padding-bottom: calc(62px + var(--safe-b)); }
  .side { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 800; left: 0; right: 0; bottom: 0;
    background: var(--chrome); padding: 6px 4px calc(6px + var(--safe-b));
  }
  .tabbar button { border: 0; background: transparent; color: #aab6c0; display: grid; justify-items: center; gap: 2px; font-size: 11px; padding: 4px 0; position: relative; cursor: pointer; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button[aria-current=page] { color: #fff; }
  .tabbar button[aria-current=page]::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; background: var(--signal); }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10.5px; }
  .toolbar { padding: 12px 12px 10px; }
  .period { font-size: 22px; flex: 1 0 100%; order: -1; margin: 0; }
  .toolbar .spacer { display: none; }
  .board { margin: 0 0 16px; border-radius: 0; border-left: 0; border-right: 0; max-height: none; }
  .tl { min-width: 760px; }
  .tl.day { min-width: 980px; }
  .tl-label { padding: 8px; }
  .tl-label .sub { display: none; }
  .tl-label .sub.members { display: block; font-size: 11px; }
  .task-layout { grid-template-columns: 1fr; }
  .thread, .compact-modal .thread { min-height: 320px; max-height: none; height: auto; }
  .form-grid.compact { grid-template-columns: 1fr; }
  .filterbar { padding: 0 12px 10px; }
  .pl-head { padding: 10px 12px; }
  .pl-head .period { flex: 1 0 100%; order: -1; font-size: 22px; margin: 0; }
  .pl-controls .ctl-label { display: none; }
  .pl-head ~ .board { max-height: none; }
  .tp { --tp-first: 64px; --tp-col: 150px; }
  .import-src { grid-template-columns: 1fr; }
  .shell.side-mini { grid-template-columns: 1fr; }
  .chat-drawer { bottom: calc(62px + var(--safe-b)); width: 100vw; }
  .selbar { bottom: calc(72px + var(--safe-b)); left: 12px; right: 12px; transform: none; }
  .selbar select { flex: 1 1 40%; max-width: none; }
  .tl-label .nm { white-space: normal; font-size: 13px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .toolbar select { flex: 1 1 40%; max-width: none; }
  .toolbar .seg { flex: 1 1 auto; }
  .toolbar .seg button { flex: 1; }
  .page-head { padding: 14px 14px 10px; }
  .page-body { padding: 0 14px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { max-height: calc(100vh - 16px); }
  .overlay { padding: 8px; align-items: end; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 62px - var(--safe-b)); }
  .chat.in-convo .channels { display: none; }
  .chat:not(.in-convo) .convo { display: none; }
  .convo-head .back { display: inline-flex; }
  .msgs { padding: 12px 12px 8px; }
  .att-img img { max-width: 200px; }
  #toasts { bottom: calc(76px + var(--safe-b)); right: 12px; }
  .hide-sm { display: none !important; }
  .tabbar button > span:not(.badge) { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* barre du bas : 4 raccourcis + « Menu » (tout le reste du menu dans la feuille .mm-sheet) */
  .tabbar { grid-auto-columns: minmax(0, 1fr); }
  .tabbar .badge-dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 2px; left: calc(50% + 8px); background: var(--signal); }
  .home-grid { grid-template-columns: 1fr; }
  .home-week { grid-template-columns: repeat(7, minmax(64px, 1fr)); overflow-x: auto; }
  .home-head .btn { flex: 1 1 auto; }
  .hol-badge { margin: 6px 0 0; display: table; }
}

/* ------------------------------------------------------------ Plans PDF des affaires (menu Actions › Plans) */
.act-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.act-tabs svg, .task-ref svg { width: 15px; height: 15px; vertical-align: -3px; }
.act-plan-link { border: 0; background: transparent; color: var(--blue); cursor: pointer; padding: 2px 6px 2px 2px; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; font: inherit; font-size: 13px; text-align: left; max-width: 180px; }
.act-plan-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-plan-link svg { flex: none; }
.act-plan-link .act-ind { flex: none; overflow: visible; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg-soft, rgba(0,0,0,.05)); border-radius: 4px; padding: 0 4px; }
.act-plan-link { max-width: 230px; }
.act-last { white-space: nowrap; font-size: 13px; }
.act-last-at { display: inline-flex; flex-direction: column; }
.act-last .act-desc { max-width: 160px; }
.act-plan-link:hover { background: var(--tint-blue); }
.act-plan-link svg { width: 16px; height: 16px; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; gap: 4px; }
.btn-sm svg { width: 14px; height: 14px; }
.main.main-fill > .plan-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 14px; }
.plan-intro svg { width: 44px; height: 44px; color: var(--muted-2); }
.plan-intro .btn { margin-top: 8px; }
.plan-home-title { font-size: 15px; margin: 4px 0 10px; }
.plan-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.plan-proj { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.plan-proj:hover { border-color: var(--blue); }
.plan-proj .swatch { width: 28px; height: 5px; border-radius: 3px; margin: 0 0 2px; }
.plan-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.plan-bar-group { display: flex; align-items: center; gap: 4px; min-width: 0; }
.plan-bar-group > span:first-child > svg { width: 20px; height: 20px; color: var(--muted); flex: none; margin-right: 4px; }
.plan-select { width: auto; max-width: 340px; min-height: 38px; font-weight: 600; }
.plan-pageno { font-size: 13px; color: var(--ink-2); white-space: nowrap; padding: 0 4px; }
.plan-zoom { min-width: 64px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.plan-bar .btn-primary.active { background: var(--signal); border-color: var(--signal); color: #2A3651; }
.plan-upload { font-size: 13px; color: var(--blue); font-weight: 600; margin-left: 6px; white-space: nowrap; }
.plan-hint { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--tint-yellow); border: 1px solid var(--signal); font-weight: 600; }
.plan-hint svg { width: 18px; height: 18px; flex: none; }
.plan-hint .btn { margin-left: auto; min-height: 30px; }
.plan-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: minmax(0, 1fr); gap: 12px; }
.plan-stage { position: relative; overflow: auto; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 6px; overscroll-behavior: contain; }
.plan-stage.placing, .plan-stage.placing .plan-sheet { cursor: crosshair; }
.plan-stage.placing { outline: 3px solid var(--signal); outline-offset: -3px; }
.plan-sheet { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 1px 4px rgba(42,54,81,.25); min-width: 120px; min-height: 120px; }
.plan-sheet.loading { display: grid; place-items: center; width: 100%; height: 100%; background: transparent; box-shadow: none; }
.plan-wait { color: var(--muted); padding: 24px; text-align: center; }
.plan-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* calque des pastilles : transparent au pointeur (les annotations dessous restent survolables), sauf les pastilles */
.plan-pins { position: absolute; inset: 0; pointer-events: none; }
.plan-pins > * { pointer-events: auto; }
.plan-pin { position: absolute; transform: translate(-50%, -50%); min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; border: 2px solid #fff;
  color: #fff; font: 700 12px/22px var(--f-body, system-ui); text-align: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.45); touch-action: none; z-index: 1; }
.plan-pin:hover, .plan-pin.focus { z-index: 3; }
.plan-pin.focus { box-shadow: 0 0 0 4px rgba(245,184,0,.75), 0 1px 4px rgba(0,0,0,.45); animation: pin-pulse 1.2s ease-out 2; }
.plan-pin.dragging { cursor: grabbing; z-index: 4; opacity: .85; transform: translate(-50%, -50%) scale(1.2); }
@keyframes pin-pulse { 0% { box-shadow: 0 0 0 0 rgba(245,184,0,.9), 0 1px 4px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 14px rgba(245,184,0,0), 0 1px 4px rgba(0,0,0,.45); } }
.pin-ouverte { background: #1f6fb2; }
.pin-proche { background: #e08a00; }
.pin-retard { background: #c8382e; }
.pin-cloturee { background: #2e8b6e; }
.plan-side { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.plan-side-tabs { display: flex; margin: 10px 10px 0; flex: none; }
.plan-side-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.plan-side-tabs svg { width: 15px; height: 15px; }
.plan-side-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 12px 12px; }
.plan-side-chat { display: flex; flex-direction: column; padding: 10px 0 0; overflow: hidden; }
.plan-side-chat .thread { flex: 1 1 0; min-height: 0; max-height: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.plan-side-chat .thread-msgs { overflow-x: hidden; }
.plan-stage-empty { display: grid; place-items: center; }
.linkish { border: 0; background: none; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; }
.plan-side h3 { font-size: 14px; margin: 14px 0 6px; }
.plan-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 13px; }
.plan-leg { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; cursor: pointer; font: inherit; text-align: left; }
.plan-leg:hover { border-color: var(--blue); }
.plan-leg[aria-pressed=false] { opacity: .45; background: transparent; text-decoration: line-through; }
.plan-filter-hint { margin: 6px 0 0; }
.plan-leg b { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.plan-dot { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; color: #fff; font-size: 11px; font-weight: 700; }
.plan-dot.small { min-width: 12px; width: 12px; height: 12px; padding: 0; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 4px 4px 6px; border-radius: 8px; }
/* emplacements d'une action placée plusieurs fois sur le plan (1.18.0) */
.plan-spots { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 6px; padding-left: 34px; font-size: 12.5px; }
.plan-spot { display: inline-flex; align-items: center; gap: 2px; padding: 1px 2px 1px 6px; border: 1px solid var(--line); border-radius: 10px; }
.plan-spot .linkish { text-decoration: none; }
.plan-spot-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font: inherit; line-height: 1; }
.plan-spot-x:hover { color: #c8382e; }
.plan-item.focus { background: var(--tint-yellow); }
.plan-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; padding: 2px 0; font: inherit; }
.plan-item-main strong { font-size: 13.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-item-main:hover strong { color: var(--blue); }
.plan-item .btn-icon { width: 30px; min-height: 30px; }
.plan-item-btns { display: inline-flex; gap: 2px; flex: none; }
.plan-item .btn-icon.active { background: var(--signal); color: #2A3651; }
/* colonne des plans (1.20.0) : à gauche du plan, repliable ; sur téléphone, remplacée par les listes de la barre */
.plan-main.has-nav { grid-template-columns: 230px minmax(0, 1fr) 340px; }
.plan-main.has-nav.side-hidden { grid-template-columns: 230px minmax(0, 1fr); }
.plan-main.has-nav.nav-hidden { grid-template-columns: minmax(0, 1fr) 340px; }
.plan-main.has-nav.nav-hidden.side-hidden { grid-template-columns: minmax(0, 1fr); }
.plan-main.nav-hidden > .plan-nav { display: none; }
.plan-nav { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.plan-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.plan-nav-head strong { font-size: 14px; }
.plan-nav-kinds { display: flex; flex-wrap: wrap; gap: 4px; }
.plan-kchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 12px/1.4 var(--f-body, system-ui); cursor: pointer; }
.plan-kchip b { color: var(--muted); font-weight: 700; }
.plan-kchip[aria-pressed=true] { background: #2A3651; border-color: #2A3651; color: #fff; }
.plan-kchip[aria-pressed=true] b { color: #ffb084; }
.plan-nav-search { width: 100%; min-height: 34px; font-size: 13px; }
.plan-nav-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.plan-nav-group { margin: 8px 0 2px; color: var(--muted); font: 700 11px/1.3 var(--f-body, system-ui); text-transform: uppercase; letter-spacing: .04em; }
.plan-nav-group:first-child { margin-top: 0; }
.plan-nav-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 6px 30px 6px 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.plan-nav-item:hover { background: var(--surface-2); }
.plan-nav-item.on { background: var(--tint-blue); border-color: var(--blue-fill); }
.plan-nav-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.plan-nav-meta { color: var(--muted); font-size: 11.5px; }
.plan-nav-count { position: absolute; top: 7px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #1f6fb2; color: #fff; font: 700 11px/20px var(--f-body, system-ui); text-align: center; }
.plan-nav-add { justify-content: center; }
.plan-cur { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 420px; }
.plan-cur strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-cur-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.plan-nav-toggle[aria-pressed=true] { color: var(--blue); }
/* colonne affichée : le nom remplace les listes déroulantes ; colonne masquée : listes (type, plan) dans la barre */
.plan-wrap.nav-on .plan-select, .plan-wrap.nav-on .plan-kind-select { display: none; }
.plan-wrap:not(.nav-on) .plan-cur { display: none; }
.plan-kind-select { width: auto; max-width: 170px; min-height: 38px; }
/* panneau des actions : noms longs (autres plans) sur une ligne */
.plan-also { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .plan-main { grid-template-columns: minmax(0, 1fr) 260px; }
  .plan-main.has-nav { grid-template-columns: 200px minmax(0, 1fr) 260px; }
  .plan-main.has-nav.side-hidden { grid-template-columns: 200px minmax(0, 1fr); }
  .plan-main.has-nav.nav-hidden { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 860px) {
  .plan-main, .plan-main.has-nav, .plan-main.has-nav.side-hidden, .plan-main.has-nav.nav-hidden { grid-template-columns: 1fr; grid-template-rows: none; }
  .plan-main > .plan-nav, .plan-nav-toggle, .plan-cur { display: none !important; }
  .plan-wrap.nav-on .plan-select, .plan-wrap.nav-on .plan-kind-select { display: block; }
  .plan-bar-group { flex-wrap: wrap; }
  .plan-kind-select { max-width: 40vw; }
  .plan-stage { height: 68vh; height: 68dvh; padding: 6px; }
  .plan-side { overflow: visible; }
  .plan-side-body { overflow: visible; }
  .plan-side-chat .thread { height: 70vh; height: 70dvh; flex: none; }
  .plan-bar { gap: 6px; }
  .plan-select { max-width: 52vw; }
}

/* ------------------------------------------------------------ Actions : synthèse (KPI) et filtres du mode liste */
.act-synth { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.act-synth > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.act-synth > summary::-webkit-details-marker { display: none; }
.act-synth > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.act-synth:not([open]) > summary::after { transform: rotate(-90deg); }
.act-synth > summary svg { width: 18px; height: 18px; color: var(--muted); }
.act-synth > summary .muted { font-weight: 400; }
#act-kpis { padding: 0 14px 14px; }
.akpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.akpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.akpi:disabled { cursor: default; }
.akpi:not(:disabled):hover { border-color: var(--blue); }
.akpi.on { background: var(--tint-blue); border-color: var(--blue); }
.akpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.akpi-value { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.akpi-sub { font-size: 12px; color: var(--muted); }
.akpi.k-open { border-left-color: #1f6fb2; }
.akpi.k-late { border-left-color: var(--danger); }
.akpi.k-late .akpi-value { color: var(--danger); }
.akpi.k-week { border-left-color: #e08a00; }
.akpi.k-none { border-left-color: var(--muted-2); }
.akpi.k-done { border-left-color: var(--ok); }
.akpi.k-delay { border-left-color: var(--ink-3); }
.akpi.k-plan { border-left-color: var(--signal); }
.akpi-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; margin-top: 10px; }
.akpi-panel { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); min-width: 0; }
.akpi-panel h3 { font-size: 13px; margin: 0 0 8px; }
.akpi-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.akpi-bar-btn { width: 100%; display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; padding: 3px 6px; border-radius: 6px; cursor: pointer; text-align: left; }
.akpi-bar-btn:hover { background: var(--line-2); }
.akpi-bar-btn.on { background: var(--tint-blue); }
.akpi-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.akpi-bar { display: flex; height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.akpi-bar-ok { background: #1f6fb2; }
.akpi-bar-late { background: var(--danger); }
.akpi-bar-p.prio-urgente { background: var(--danger); }
.akpi-bar-p.prio-haute { background: #d9822b; }
.akpi-bar-p.prio-normale { background: var(--blue-fill); }
.akpi-bar-p.prio-basse { background: var(--muted-2); }
.akpi-bar-n { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.akpi-late-n { color: var(--danger); font-weight: 400; font-size: 12px; }
.act-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 10px; }
/* tri par en-tête de colonne (actions, pages) */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--blue); }
th.sortable .sort-ind { color: var(--muted); font-size: 11px; opacity: .55; }
th.sortable.on { color: var(--blue); }
th.sortable.on .sort-ind { color: var(--blue); opacity: 1; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-align: left; }
.linklike:hover { text-decoration: underline; }
/* actions : barre de la liste (compte, tri, colonnes) et vues rapides */
.act-listbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.act-listbar .act-count { margin: 0; }
.act-views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.act-views .ctl-label { margin-right: 4px; }
.act-view-chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.act-view-chip:hover { border-color: var(--blue); color: var(--ink); }
.act-view-chip.on { background: var(--tint-blue); border-color: var(--blue); color: var(--blue); font-weight: 700; }
.act-view-chip.add { border-style: dashed; color: var(--blue); }
/* vue enregistrée : pastille + bouton ⋯ (modifier, supprimer) collés */
.act-view-grp { display: inline-flex; align-items: stretch; }
.act-view-grp .act-view-chip { border-radius: 999px 0 0 999px; border-right: 0; }
.act-view-more { padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 0 999px 999px 0; background: var(--surface); color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.act-view-more:hover { color: var(--blue); border-color: var(--blue); }
.act-view-grp.on .act-view-more { background: var(--tint-blue); border-color: var(--blue); color: var(--blue); }
.act-views-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.act-cols-pop .pop-item.check { display: flex; align-items: center; gap: 8px; }
/* éditeur de pages : chiffres, filtres, sélection, versions */
.pg-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 0 0 14px; }
.pg-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pg-kpi strong { font-family: var(--f-head); font-size: 24px; font-weight: 800; line-height: 1.1; }
.pg-kpi span { font-size: 12.5px; color: var(--muted); }
.pg-kpi.ok { border-left-color: var(--ink-green, #1e7f4f); }
.pg-kpi.warn { border-left-color: var(--ink-orange); }
.pg-kpi.draft { border-left-color: var(--blue); }
.pg-kpi:hover, .pg-kpi.on { border-color: var(--blue); }
.pg-kpi.on { background: var(--tint-blue); }
#pg-list > .pg-list-card { max-width: none; width: 100%; }
.pg-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 12px; }
.pg-flt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-flt-q { flex: 1 1 260px; }
.pg-flt-q input { width: 100%; }
.pg-flt.on select { border-color: var(--blue); }
.pg-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; border-radius: var(--r-md); background: var(--tint-blue); }
.pg-bulk[hidden] { display: none; }
.pg-table .pg-cb { width: 28px; }
.pg-table tr.sel td { background: var(--tint-blue); }
.pill.pg-st-published { background: #dff3e8; color: #1e7f4f; }
.pill.pg-st-changed { background: #fdeee6; color: #b54500; }
.pill.pg-st-draft { background: var(--surface-2); color: var(--ink-2); }
.pg-ver-link { font-size: 13px; }
.pg-ver-note { font-style: italic; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-ver { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; min-width: 0; height: min(70vh, 720px); }
.modal.wide:has(.pg-ver) { width: min(1120px, 94vw); max-width: none; }
.pg-ver-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding-right: 4px; }
.pg-ver-item { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.pg-ver-item:hover { border-color: var(--blue); }
.pg-ver-item.on { background: var(--tint-blue); border-color: var(--blue); }
.pg-ver-item .pg-ver-note { white-space: normal; }
.pg-ver-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pg-ver-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pg-ver-prev, .pg-diff { flex: 1; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.pg-diff-l { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.pg-diff-l li { display: flex; gap: 8px; padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.pg-diff-op { width: 14px; flex: none; font-weight: 800; text-align: center; }
.pg-diff-add { background: #e3f5ea; color: #155c39; }
.pg-diff-del { background: #fdecea; color: #9b2c22; text-decoration: line-through; text-decoration-color: rgba(155, 44, 34, .4); }
.pg-diff-eq { color: var(--muted); }
@media (max-width: 760px) { .pg-ver { grid-template-columns: minmax(0, 1fr); height: auto; } .pg-ver-list { max-height: 200px; } }
.act-flt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.act-flt select { min-height: 36px; width: auto; max-width: 240px; }
.act-flt.on select { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.act-flt-search { flex: 1 1 240px; max-width: 360px; }
.act-search { min-height: 36px; width: 100%; }
.prio-chips { display: inline-flex; gap: 4px; }
.prio-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); border-radius: 16px; min-height: 34px; padding: 0 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.prio-chip[aria-pressed=true].prio-urgente { background: var(--danger); border-color: var(--danger); color: #fff; }
.prio-chip[aria-pressed=true].prio-haute { background: #d9822b; border-color: #d9822b; color: #fff; }
.prio-chip[aria-pressed=true].prio-normale { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.prio-chip[aria-pressed=true].prio-basse { background: var(--chrome-2); border-color: var(--chrome-2); color: #fff; }
.act-flt-reset { min-height: 36px; }
.act-flt-reset svg { width: 16px; height: 16px; }
.act-count { margin: 0 0 6px; }
@media (max-width: 860px) {
  .akpi-row { grid-template-columns: 1fr; }
  .akpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .akpi-value { font-size: 22px; }
  .act-flt, .act-flt-search { flex: 1 1 45%; max-width: none; }
  .act-flt select { max-width: none; width: 100%; }
  .prio-chips { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ Médias : dossiers (tags) et classement */
.media-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.media-tree { position: sticky; top: 0; display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 6px; max-height: 70vh; overflow: auto; }
.mt-node { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
  padding: 5px 8px 5px calc(8px + (var(--d, 0) - 1) * 14px); border-radius: 6px; }
.mt-node.mt-all { padding-left: 8px; font-weight: 600; }
.mt-node:hover { background: var(--surface-2); }
.mt-node.on { background: var(--tint-blue); color: var(--blue-dark); font-weight: 600; }
.mt-ico { flex: none; width: 18px; text-align: center; }
.mt-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-n { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-none { margin-top: 6px; border-top: 1px solid var(--line-2); border-radius: 0 0 6px 6px; padding-left: 8px; color: var(--ink-3); font-style: italic; }
.media-crumb { font-size: 13px; margin: 0 0 10px; color: var(--muted); }
.media-pickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin: -4px 0 12px; border: 1px solid var(--signal); background: var(--tint-yellow); border-radius: 8px; font-weight: 600; font-size: 13.5px; }
.media-pickbar > span { margin-right: auto; }
.media-tile.picking { cursor: pointer; }
.media-tile.picked { outline: 3px solid var(--blue); outline-offset: -3px; }
.media-check { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #fff; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.media-tile.picked .media-check { background: var(--blue-fill); }
.media-tile-tag { position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; padding: 1px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.media-doc.picking { cursor: pointer; }
.media-doc.picked { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); background: var(--tint-blue); }
.media-doc .media-check { position: static; flex: none; border-color: var(--line); background: var(--surface); color: var(--blue-dark); box-shadow: none; }
.media-doc.picked .media-check { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.media-tag { display: inline-block; font-size: 11.5px; padding: 0 6px; border-radius: 8px; background: var(--tint-blue); color: var(--blue-dark); }
.media-tag.none { background: var(--line-2); color: var(--muted); font-style: italic; }
.media-folder-picks { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.media-folder-pick { text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; padding: 6px 8px 6px calc(8px + var(--d, 0) * 14px); border-radius: 6px; cursor: pointer; }
.media-folder-pick:hover { background: var(--tint-blue); }
@media (max-width: 860px) {
  .media-layout { grid-template-columns: 1fr; }
  .media-tree { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; padding: 4px; }
  .mt-node, .mt-node.mt-all, .mt-none { flex: none; width: auto; padding: 6px 10px; margin: 0; border: 0; border-radius: 16px; }
}

/* ------------------------------------------------------------ Messagerie : réactions, réponses, épingles, classement au survol */
.quick-reacts { display: inline-flex; gap: 1px; visibility: hidden; }
.msg:hover .quick-reacts { visibility: visible; }
@media (pointer: coarse) { .quick-reacts { visibility: visible; } }
.qr { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 3px; border-radius: 6px; color: var(--muted); }
.qr:hover { background: var(--line-2); transform: scale(1.15); }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 1px 8px; font: inherit; font-size: 14px; cursor: pointer; line-height: 1.5; }
.react-chip span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.react-chip.mine { border-color: var(--blue); background: var(--tint-blue); }
.react-chip.mine span { color: var(--blue-dark); }
.react-chip:hover { border-color: var(--blue); }
.emoji-pop { max-width: 330px; max-height: 340px; overflow: auto; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 2px 4px 6px; }
.react-grid { grid-template-columns: repeat(8, 1fr); padding: 4px; }
.emoji-cell { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; }
.emoji-cell:hover { background: var(--tint-blue); }
.emoji-btn { font-size: 19px; }
.reply-quote { display: block; max-width: 100%; text-align: left; border: 0; border-left: 3px solid var(--blue); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13px;
  padding: 4px 10px; margin: 2px 0 4px; border-radius: 0 6px 6px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-quote strong { color: var(--blue-dark); }
.reply-quote:hover { background: var(--tint-blue); }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 6px 6px 10px; border-left: 3px solid var(--blue); background: var(--tint-blue); border-radius: 0 8px 8px 0; font-size: 13px; }
.reply-bar-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .btn-icon { width: 30px; min-height: 30px; }
.pin-mark { font-size: 12px; }
.pinbar { border-bottom: 1px solid var(--line); background: var(--tint-yellow); }
.pinbar-head { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; padding: 8px 16px; cursor: pointer; text-align: left; }
.pinbar-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinbar-list { list-style: none; margin: 0; padding: 0 12px 10px; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.pinbar-list li { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 4px; }
.pin-quote { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.pin-quote:hover { background: var(--tint-blue); }
.pin-quote > span:first-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg.flash { animation: msg-flash 1.6s ease-out; border-radius: 8px; }
@keyframes msg-flash { 0%, 30% { background: var(--tint-yellow); box-shadow: 0 0 0 4px var(--tint-yellow); } 100% { background: transparent; box-shadow: none; } }
.att-wrap { position: relative; display: inline-block; max-width: 100%; }
.att-tag-btn { position: absolute; top: 6px; right: 6px; border: 0; border-radius: 12px; background: rgba(42,54,81,.78); color: #fff; font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px;
  cursor: pointer; opacity: 0; transition: opacity .12s; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-wrap:hover .att-tag-btn, .att-tag-btn:focus-visible { opacity: 1; }
.att-tag-btn.tagged { opacity: .85; background: rgba(31,111,178,.88); }
.att-tag-btn:hover { background: var(--blue-fill); opacity: 1; }
.att-wrap > .att-file + .att-tag-btn, .att-wrap > audio + .att-tag-btn { position: static; display: inline-block; margin: 4px 0 0; opacity: 0; background: var(--line-2); color: var(--ink-2); }
.att-wrap:hover > .att-file + .att-tag-btn, .att-wrap > .att-file + .att-tag-btn.tagged { opacity: 1; }
.att-wrap > .att-file + .att-tag-btn.tagged { background: var(--tint-blue); color: var(--blue-dark); }
@media (pointer: coarse) { .att-tag-btn { opacity: .9; } }
.media-folder-pick.on { background: var(--tint-blue); font-weight: 600; }

/* ------------------------------------------------------------ Médias : classement au survol ; discussion : bouton Actions */
.media-cell { position: relative; min-width: 0; }
.media-cell .media-tile { width: 100%; }
.media-cell:hover .att-tag-btn, .media-doc:hover .att-tag-btn { opacity: 1; }
.att-tag-btn.media-doc-tag { position: static; flex: none; opacity: 0; background: var(--line-2); color: var(--ink-2); max-width: 180px; }
.att-tag-btn.media-doc-tag.tagged { opacity: 1; background: var(--tint-blue); color: var(--blue-dark); }
.att-tag-btn.media-doc-tag:hover { background: var(--blue-fill); color: #fff; }
@media (pointer: coarse) { .att-tag-btn.media-doc-tag { opacity: .9; } }
.convo-actions { gap: 6px; }
.convo-act-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue-fill); color: #fff; font-size: 12px; font-weight: 700; }
.convo-act-n.late { background: var(--danger); }

/* ------------------------------------------------------------ Administration : dossiers des médias */
.tags-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.tags-tools input[type=search] { flex: 1 1 220px; max-width: 320px; min-height: 36px; }
.tags-selinfo { font-weight: 600; margin-left: 6px; }
.tags-table td.num { text-align: right; font-variant-numeric: tabular-nums; width: 110px; }
.tags-table tr.selected td { background: var(--tint-blue); }
.tags-path { padding-left: calc(10px + var(--d, 0) * 18px) !important; }
.tags-warn { color: #b06a00; font-size: 13px; }
.tags-from { display: flex; flex-wrap: wrap; gap: 4px; }

/* ------------------------------------------------------------ Intervention : jours exclus et répétition */
.rec-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.rec-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; }
.rec-line .check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.rec-sel { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-weight: 600; }
.rec-sel select { width: auto; min-width: 230px; max-width: 100%; min-height: 34px; }
.rec-custom { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); }
.rec-custom select { width: auto; min-height: 34px; }
.rec-num { width: 72px !important; min-height: 34px; }
.rec-days { display: inline-flex; gap: 4px; }
.rec-day { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.rec-day[aria-pressed=true] { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.rec-ends input[type=date] { width: auto; min-height: 34px; }
.rec-summary { font-size: 13px; color: var(--muted); }
.rec-summary.many { color: var(--blue-dark); font-weight: 600; }
.rec-summary.bad { color: var(--danger); font-weight: 600; }
.series-choices { display: flex; flex-direction: column; gap: 6px; }
.series-choices .btn { justify-content: flex-start; }
@media (max-width: 640px) { .rec-sel { margin-left: 0; width: 100%; } .rec-sel select { flex: 1; min-width: 0; } }

/* ------------------------------------------------------------ Médias : sélection et téléchargement en zip */
.media-tools .btn-sm svg, .media-pickbar .btn svg { width: 15px; height: 15px; }
.media-pickbar .btn { display: inline-flex; align-items: center; gap: 5px; }

/* ------------------------------------------------------------ Plans : annotations, indices, photos épinglées */
.plan-ann { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.plan-ann .ann-text { paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; font-family: var(--f-body, system-ui); }
.plan-ann .ann-hit { pointer-events: stroke; cursor: help; }
.plan-ann .ann-text { pointer-events: all; cursor: help; }
.plan-stage.annotating .plan-ann { pointer-events: all; touch-action: none; cursor: crosshair; }
.plan-stage.annotating .plan-ann .ann-hit, .plan-stage.annotating .plan-ann .ann > :not(title) { pointer-events: stroke; }
.plan-stage.annotating .plan-ann .ann-text { pointer-events: all; }
.plan-stage.annotating .plan-pins { pointer-events: none; opacity: .55; }
.plan-stage.annotating { outline: 3px solid var(--blue); outline-offset: -3px; }
/* liens entre plans (1.17.0) : zones orange en pointillés, étiquette « ↗ plan lié » ; un toucher ouvre le plan lié */
.plan-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.plan-links .lk-area { fill: rgba(231, 82, 0, .07); stroke: #E75200; stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.plan-links .lk-line { stroke: #E75200; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plan-links .lk-hit { pointer-events: all; cursor: pointer; }
.plan-links .lk:hover .lk-area { fill: rgba(231, 82, 0, .16); }
.plan-links .lk.flash .lk-area { animation: lk-flash .65s ease-in-out 4; }
@keyframes lk-flash { 50% { fill: rgba(231, 82, 0, .38); stroke-width: 3; } }
.plan-links .lk-draft .lk-area { fill: rgba(231, 82, 0, .14); stroke-dasharray: none; }
.plan-links .lk-vertex { fill: #fff; stroke: #E75200; stroke-width: 2; }
.plan-links .lk-vertex.first { fill: #E75200; }
.plan-stage.annotating .plan-links .lk-hit, .plan-stage.placing .plan-links .lk-hit { pointer-events: none; }
.plan-stage.linking .plan-links { pointer-events: all; touch-action: none; cursor: crosshair; }
.plan-stage.linking { outline: 3px solid #E75200; outline-offset: -3px; }
.plan-stage.linking .plan-pins:not(.plan-linkchips) { opacity: .45; }
.plan-linkchip { position: absolute; transform: translate(-4px, -50%); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 2px 8px; border: 1px solid #E75200; border-radius: 12px; background: #fff; color: #b33f00; font: 700 12px/18px var(--f-body, system-ui);
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.plan-linkchip:hover { background: #E75200; color: #fff; }
.plan-linkchip.flash { animation: pin-pulse 1.2s ease-out 2; }
.plan-pin.linked { border-style: dashed; }
.plan-backlinks { gap: 4px; flex-wrap: wrap; }
.plan-backlink { border-color: #E75200; color: #b33f00; }
.plan-also { display: block; }
.ann-preview { opacity: .75; }
.plan-annbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 10px; border: 1px solid var(--blue); border-radius: 8px; background: var(--tint-blue); }
.ann-group { display: inline-flex; gap: 3px; }
.ann-tool { min-width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.ann-tool[aria-pressed=true] { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.ann-color { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.ann-color[aria-pressed=true] { box-shadow: 0 0 0 3px var(--ink); }
.ann-width { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.ann-width span { display: block; width: 20px; background: var(--ink); border-radius: 3px; }
.ann-width[aria-pressed=true] { border-color: var(--blue-fill); box-shadow: 0 0 0 2px var(--blue-fill); }
.ann-help { flex: 1 1 auto; }
.plan-photo-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: #37474f; font-size: 15px; line-height: 1;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.45); z-index: 1; padding: 0; }
.plan-photo-pin:hover { transform: translate(-50%, -50%) scale(1.15); z-index: 3; }
.plan-ver { gap: 5px; font-weight: 700; padding: 0 8px; min-height: 36px; }
.plan-ver.on { background: var(--tint-yellow); }
.plan-ver-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--line-2); font-size: 11px; color: var(--ink-2); }
.plan-bar-acts { margin-left: auto; }
.plan-bar-acts .btn.active { background: var(--signal); border-color: var(--signal); color: #2A3651; }
.ver-pop { min-width: 300px; }
.ver-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 8px; border-radius: 6px; }
.ver-row.on { background: var(--tint-blue); }
.ver-row strong { font-size: 14px; }
.ver-btns { display: flex; gap: 4px; flex: none; }
.plan-hint.archived { background: var(--tint-blue); border-color: var(--blue); }
.cmp-legend { flex: 1 1 auto; }
.cmp-old { color: #e02020; }
.cmp-new { color: #1e5bd8; }
.cmp-op { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; }
.cmp-op input { width: 120px; }
.plan-compare { mix-blend-mode: multiply; }
.plan-layers { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; }
.plan-layer { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.photo-preview { max-width: 100%; max-height: 50vh; border-radius: 8px; object-fit: contain; background: var(--surface-2); }
.photo-modal .photo-view { border: 0; padding: 0; background: none; cursor: zoom-in; }
.photo-modal .photo-view img { max-width: 100%; max-height: 60vh; border-radius: 8px; display: block; margin: 0 auto; }
@media (max-width: 860px) {
  .plan-bar-acts { margin-left: 0; width: 100%; }
  .plan-bar-acts .btn { flex: 1 1 auto; justify-content: center; }
  .plan-annbar { gap: 6px; }
  .ann-help { flex-basis: 100%; order: 9; }
}

/* ------------------------------------------------------------ Plans : disposition compacte, téléchargement, info-bulle */
.plan-stage-wrap { position: relative; min-height: 0; min-width: 0; display: flex; }
.plan-stage-wrap > .plan-stage { flex: 1 1 auto; }
.plan-main.side-hidden { grid-template-columns: minmax(0, 1fr); }
.plan-main.side-hidden > .plan-side { display: none; }
/* barre d'annotation et bandeau d'information flottants au-dessus du plan (pas de ligne perdue) */
.plan-stage-wrap > .plan-annbar { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 6; box-shadow: 0 4px 14px rgba(42,54,81,.18); padding: 4px 8px; gap: 6px 10px; }
.plan-stage-wrap > .plan-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 6; width: max-content; max-width: calc(100% - 20px); box-shadow: 0 4px 14px rgba(42,54,81,.2); padding: 6px 10px; flex-wrap: wrap; }
.plan-annbar .ann-tool, .plan-annbar .ann-width { min-width: 32px; height: 32px; }
.plan-annbar .ann-color { width: 24px; height: 24px; }
/* page Actions › Plans : en-tête et marges réduits */
.main.plans-mode > .page-head { padding: 8px 14px 6px; gap: 6px 10px; }
.main.plans-mode > .page-head h1 { font-size: 22px; }
.main.plans-mode > .plan-body { padding: 0 10px 8px; }
.main.plans-mode .plan-wrap { gap: 6px; }
.focus-mode .main.plans-mode > .page-head { display: none; }
.focus-mode .main.plans-mode > .plan-body { padding-top: 8px; }
.plan-bar { gap: 4px 10px; }
.plan-bar .btn-icon { width: 34px; min-height: 34px; }
.plan-bar-acts .btn-sm { min-height: 34px; gap: 5px; }
.plan-bar-acts .btn-sm svg { width: 16px; height: 16px; }
.plan-bar .btn[aria-pressed=true]:not(.btn-primary) { background: var(--tint-blue); }
@media (max-width: 1400px) { .plan-bar-acts .lbl { display: none; } .plan-select { max-width: 260px; } }
.dl-pop { min-width: 300px; }
.dl-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; padding: 8px; border-radius: 6px; cursor: pointer; }
.dl-item:hover { background: var(--tint-blue); }
.dl-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.dl-item .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.dl-ic { font-size: 20px; width: 26px; text-align: center; flex: none; }
.dl-marks { margin: 6px 8px 4px; font-size: 13px; }
.ann-tip { position: fixed; z-index: 1000; display: flex; flex-direction: column; gap: 1px; background: #2A3651; color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 6px; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.3); max-width: 280px; }
.ann-tip span { color: #c9d4dc; }
@media (max-width: 860px) {
  .main.plans-mode > .page-head { padding: 6px 10px; }
  .plan-stage-wrap > .plan-annbar { position: static; }
  .plan-stage-wrap { flex-direction: column; }
}

/* ------------------------------------------------------------ Mon compte : appareils connectés */
.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.device-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.device-list li.current { border-color: var(--blue); background: var(--tint-blue); }
.device-ic { font-size: 22px; flex: none; }
.device-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.device-main .muted { flex-basis: 100%; }

/* ------------------------------------------------------------ Messagerie : « Lu par » */
.readers-pop { min-width: 240px; max-width: 320px; }
.readers-list { list-style: none; margin: 0; padding: 2px 4px 6px; max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.readers-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 2px 4px; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; }
.readers-help { margin: 4px 8px 6px; max-width: 280px; }

/* ------------------------------------------------------------ PointageNav (BETA) */
.beta-chip { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #7c4dff; color: #fff; font: 700 10px/16px var(--f-body); letter-spacing: .06em; vertical-align: 2px; }
.nav .beta-chip { margin-left: auto; }
.pn-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--tint-blue); color: var(--blue-dark, var(--blue)); font: 600 11px/17px var(--f-body); vertical-align: 1px; }
.pn-tag.rh { background: #f3e8ff; color: #6a3fb3; }
.nav [data-sec="pointage"] .beta-chip + .badge { margin-left: 4px; }
.pill.ok { background: var(--tint-green, #e3f4e8); color: var(--ok, #2e7d32); }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
button.pop-item { display: block; width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink); }
.pop-item.danger { color: var(--danger); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
.pn-body { display: flex; flex-direction: column; gap: 12px; }
.pn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pn-who { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pn-mat { display: inline-block; font: 700 12.5px/1 var(--f-mono, ui-monospace, monospace); padding: 4px 6px; border-radius: 4px; background: var(--paper); color: var(--ink-2, var(--ink)); }
.pn-year { display: flex; align-items: center; gap: 2px; font-size: 18px; }
.pn-year strong { min-width: 52px; text-align: center; }
.pn-months { display: flex; flex-wrap: wrap; gap: 4px; }
.pn-month { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 10px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2, var(--ink)); position: relative; }
.pn-month:hover { border-color: var(--blue); }
.pn-month.part { border-color: #e0a64b; background: color-mix(in srgb, #e0a64b 12%, var(--surface)); }
.pn-month.full { border-color: var(--blue); background: var(--tint-blue); }
.pn-month.ok { border-color: var(--ok, #2e7d32); background: color-mix(in srgb, var(--ok, #2e7d32) 12%, var(--surface)); }
.pn-month[aria-selected=true] { background: var(--chrome); border-color: var(--chrome); color: #fff; }
.pn-ok { margin-left: 4px; font-size: 11px; }
.pn-sheet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.pn-sheet-head h2 { margin: 0; font-size: 22px; }
.pn-sheet-head .spacer { flex: 1; }
.pn-status { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.pn-valid { margin: 0 0 8px; }
.pn-help { margin: 8px 0 0; }
.pn-grid-wrap { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.pn-grid { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.pn-grid th, .pn-grid td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0; height: 28px; text-align: center; white-space: nowrap; }
.pn-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; font-size: 12.5px; padding: 4px 6px; color: var(--ink-2, var(--ink)); }
.pn-grid thead tr.pn-notes th { top: 30px; background: var(--surface); padding: 2px; font-weight: 400; }
.pn-grid tfoot td, .pn-grid tfoot th { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); font-weight: 700; font-size: 12.5px; }
.pn-grid .pn-day { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 0 8px; min-width: 92px; font-weight: 600; }
.pn-grid thead .pn-day, .pn-grid tfoot .pn-day { z-index: 3; background: var(--surface-2); }
.pn-grid .pn-tot { min-width: 60px; font-weight: 700; color: var(--muted); }
.pn-grid .pn-tot.full { color: var(--ok, #2e7d32); background: color-mix(in srgb, var(--ok, #2e7d32) 8%, transparent); }
.pn-grid .pn-tot.part { color: #b26a00; background: color-mix(in srgb, #e0a64b 14%, transparent); }
.pn-grid .pn-fix { min-width: 62px; }
.pn-grid .pn-fix2 { background: color-mix(in srgb, var(--blue) 6%, var(--surface-2)); }
.pn-grid .pn-ch { min-width: 86px; max-width: 160px; background: color-mix(in srgb, var(--ok, #2e7d32) 7%, var(--surface-2)); }
.pn-ch-head { display: flex; align-items: center; justify-content: center; gap: 2px; }
.pn-code { overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.pn-ch-menu { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 4px; }
.pn-ch-menu:hover { background: var(--line-2); color: var(--ink); }
.pn-add { min-width: 40px; }
.pn-note { width: 100%; min-width: 58px; height: 24px; min-height: 0 !important; border: 1px solid transparent !important; background: transparent; font-size: 12px; padding: 0 4px !important; text-align: center; }
.pn-note:focus { border-color: var(--blue) !important; background: var(--surface); }
.pn-note-ro { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); padding: 0 4px; }
.pn-grid tbody tr:hover .pn-c, .pn-grid tbody tr:hover .pn-day { background: color-mix(in srgb, var(--blue) 5%, var(--surface)); }
.pn-grid tbody tr.we th, .pn-grid tbody tr.we td { background: var(--surface-2); color: var(--muted); }
.pn-grid tbody tr.today .pn-day { box-shadow: inset 3px 0 0 var(--signal); }
.pn-grid tbody tr.hol .pn-day { color: #6a4fb3; }
.pn-hol { display: block; font-size: 10.5px; font-weight: 400; line-height: 1.1; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.pn-c.has { font-weight: 600; }
.pn-in { width: 100%; min-width: 56px; height: 28px; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent; text-align: center; font: inherit; font-weight: 600; padding: 0 !important; box-shadow: none !important; }
.pn-in:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--tint-blue); }
.pn-empty { max-width: 640px; }
.pn-check-list { display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.pn-links { font-size: 13px; }
.pn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 14px; background: var(--paper); font-size: 13px; }
.pn-chip button { border: 0; background: transparent; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; }
.pn-chip button:hover { background: var(--line); }
.pn-pick-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pn-pick-tools input[type=search] { flex: 1 1 260px; }
.pn-pick-list { display: grid; gap: 1px; max-height: min(420px, 50vh); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; }
.pn-pick { display: grid; grid-template-columns: 20px minmax(90px, auto) minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.pn-pick:hover { background: var(--surface-2); }
.pn-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-pick.dup { opacity: .6; }
.pn-free summary { cursor: pointer; font-size: 13.5px; color: var(--blue); }
.pn-free .inline-fields { margin-top: 8px; }
.pn-admin-tabs { margin-bottom: 4px; flex-wrap: wrap; }
.pn-admin { display: flex; flex-direction: column; gap: 12px; }
.pn-admin .card, .pn-body > .card { max-width: none; }
.pn-rules { max-width: 980px !important; }
.pn-admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pn-admin-bar .spacer { flex: 1; }
.pn-admin-bar input[type=search] { flex: 0 1 280px; }
.pn-admin-bar select { width: auto; }
.pn-month-card .card-head h2 { display: flex; align-items: center; gap: 8px; }
.pn-kpis .card-head { flex-wrap: wrap; gap: 4px 12px; }
.pn-kpis .fc-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pn-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.pn-strip-m { display: grid; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 6px 6px 5px; cursor: pointer; font: inherit; text-align: center; color: var(--ink-2, var(--ink)); }
.pn-strip-m:hover { border-color: var(--blue); }
.pn-strip-m.on { border-color: var(--chrome); box-shadow: inset 0 0 0 1px var(--chrome); }
.pn-strip-m.future { opacity: .55; }
.pn-strip-l { font-size: 12.5px; font-weight: 600; }
.pn-strip-n { font-size: 11.5px; color: var(--muted); }
.pn-strip-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-2); }
.pn-strip-bar span, .pn-legend span { display: inline-block; }
.pn-strip-bar .v, .pn-legend .v { background: var(--ok, #2e7d32); }
.pn-strip-bar .f, .pn-legend .f { background: var(--blue-fill, var(--blue)); }
.pn-strip-bar .p, .pn-legend .p { background: #e0a64b; }
.pn-strip-bar .m, .pn-legend .m { background: var(--danger); }
.pn-strip-bar .e { background: var(--line-2); }
.pn-legend { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pn-legend span { width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.pn-bulk { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--chrome); color: #fff; }
.pn-bulk .spacer { flex: 1; }
.pn-bulk .btn-ghost { color: #fff; }
.pn-selcol { width: 34px; text-align: center; }
.pill.pn-exp-ok { background: color-mix(in srgb, #7c4dff 14%, var(--surface)); color: #5b33c9; }
.pill.pn-exp-no { background: color-mix(in srgb, #e0a64b 18%, var(--surface)); color: #9a5b00; }
.pill.pn-exp-stale { background: var(--tint-red); color: var(--danger); }
.pn-list tr.pn-missing td { background: color-mix(in srgb, var(--danger) 5%, var(--surface)); color: var(--muted); }
.pn-month-card .card-head h2 .pill { font: 600 12px/18px var(--f-body); }
.pn-strip-x { color: #7c4dff; }
.pn-list tr.selected td { background: var(--tint-blue); }
@media (max-width: 860px) { .pn-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pn-list td { vertical-align: middle; }
.pn-bar-mini { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; vertical-align: middle; }
.pn-bar-mini span { display: block; height: 100%; background: #e0a64b; }
.pn-bar-mini.full span { background: var(--ok, #2e7d32); }
.modal.pn-modal { width: min(1400px, 100%); }
.pn-admin-sheet .pn-grid-wrap { max-height: calc(100vh - 260px); }
.pn-exp-head { margin-bottom: 12px; }
.pn-exp-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.pn-exp-opts > label { min-width: 220px; }
.pn-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pn-exp-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-exp-list { display: grid; gap: 1px; max-height: 420px; overflow: auto; margin-top: 10px; }
.pn-exp-row { display: grid; grid-template-columns: 20px 54px minmax(0, 1fr) 140px 60px minmax(110px, auto); align-items: center; gap: 10px; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.pn-exp-row:hover { background: var(--surface-2); }
.pn-csv { max-height: 360px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; font: 12px/1.45 var(--f-mono, ui-monospace, monospace); white-space: pre; margin: 0; }
.pn-rules ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.pn-rules li { line-height: 1.45; }
.pn-rules code { font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; word-break: break-all; }
@media (max-width: 860px) {
  .pn-grid-wrap { max-height: none; }
  .pn-sheet-head h2 { font-size: 19px; flex: 1 0 100%; }
  .pn-exp-row { grid-template-columns: 20px 50px minmax(0, 1fr) auto; }
  .pn-exp-row > :last-child { display: none; }
  .pn-pick { grid-template-columns: 20px auto minmax(0, 1fr); }
  .pn-pick > .pill, .pn-pick > .muted { display: none; }
}

/* ------------------------------------------------------------ Pages de contenu et éditeur de pages */
.pg-article { max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 26px; line-height: 1.6; font-size: 15.5px; }
.pg-article > * + * { margin-top: 14px; }
.pg-article .pg-h { margin: 24px 0 4px; line-height: 1.25; }
.pg-article h2.pg-h { font-size: 24px; }
.pg-article h3.pg-h { font-size: 19px; }
.pg-article > .pg-h:first-child { margin-top: 0; }
.pg-text p { margin: 0 0 10px; }
.pg-text p:last-child { margin-bottom: 0; }
.pg-text ul, .pg-text ol, .pg-callout ul, .pg-callout ol { margin: 4px 0 10px; padding-left: 22px; }
.pg-text a, .pg-callout a, .pg-table a { color: var(--blue); text-underline-offset: 2px; }
.pg-callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border-left: 4px solid var(--blue); background: var(--tint-blue); }
.pg-callout p { margin: 0 0 6px; }
.pg-callout p:last-child { margin: 0; }
.pg-callout.ok { border-left-color: var(--ok, #2e7d32); background: color-mix(in srgb, var(--ok, #2e7d32) 10%, var(--surface)); }
.pg-callout.warn { border-left-color: #e0a64b; background: color-mix(in srgb, #e0a64b 14%, var(--surface)); }
.pg-callout.danger { border-left-color: var(--danger); background: var(--tint-red); }
.pg-callout-ico { font-size: 18px; line-height: 1.4; }
.pg-img { margin: 0; }
.pg-img img { display: block; max-width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: zoom-in; }
.pg-img.medium img { max-width: min(480px, 100%); }
.pg-img.small img { max-width: min(260px, 100%); }
.pg-img figcaption, .pg-video figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pg-video { margin: 0; }
.pg-video video { display: block; max-width: 100%; border-radius: var(--r-sm); background: #000; }
.pg-file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); text-decoration: none; color: var(--ink); max-width: 100%; }
.pg-file:hover { border-color: var(--blue); }
.pg-file-ext { font: 700 12px/1 var(--f-cond); padding: 6px; border-radius: 3px; background: var(--chrome); color: #fff; min-width: 40px; text-align: center; }
.pg-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-table { font-size: 14.5px; }
.pg-table th { text-align: left; }
.pg-btn-wrap { margin: 0; }
.pg-hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.pg-meta { margin-top: 24px !important; }
.pg-missing { padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); color: var(--muted); font-size: 13px; text-align: center; }
.pg-list-title { display: inline-flex; align-items: center; gap: 8px; }
.pg-list-title svg { width: 18px; height: 18px; color: var(--ink-3, var(--muted)); }
.pg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 6px 0; }
.pg-bar .spacer { flex: 1; }
.pg-status { display: inline-flex; gap: 6px; }
.pg-danger { color: var(--danger); }
.pg-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pg-edit { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pg-settings { max-width: none; margin-bottom: 8px; }
.pg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-row > input:not([type=checkbox]), .pg-row > select { flex: 1 1 160px; min-width: 0; }
.pg-icon-prev svg { width: 22px; height: 22px; }
.pg-blocks { display: flex; flex-direction: column; }
.pg-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px 12px; }
.pg-block:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent); }
.pg-block-head { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; font-size: 13px; color: var(--ink-3, var(--muted)); }
.pg-block-head .spacer { flex: 1; }
.pg-block-head .btn { min-height: 28px; padding: 0 8px; }
.pg-block textarea { width: 100%; resize: vertical; }
.pg-hint { margin-top: 4px; }
.pg-insert { display: flex; justify-content: center; height: 14px; align-items: center; }
.pg-insert-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; opacity: 0; transition: opacity .12s; }
.pg-insert:hover .pg-insert-btn, .pg-insert-btn:focus { opacity: 1; }
.pg-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r-md); }
.pg-add-pop { min-width: 180px; }
.pg-filezone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pg-filezone img { max-height: 70px; max-width: 120px; border-radius: 4px; border: 1px solid var(--line); }
.pg-tgrid { display: grid; grid-template-columns: repeat(var(--cols), minmax(80px, 1fr)); gap: 4px; overflow-x: auto; }
.pg-tcell { min-height: 34px !important; padding: 4px 6px !important; font-size: 13.5px; }
.pg-tcell.th { font-weight: 700; background: var(--surface-2); }
.pg-tactions { display: flex; flex-wrap: wrap; gap: 4px; }
.pg-preview { position: sticky; top: 52px; max-height: calc(100vh - 80px); overflow: auto; }
.pg-preview-label { margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.pg-preview .pg-article { max-width: none; }
.pg-preview-title { font-size: 28px; margin: 0 0 10px; }
@media (max-width: 1100px) { .pg-editor { grid-template-columns: 1fr; } .pg-preview { position: static; max-height: none; } }
@media (max-width: 860px) { .pg-article { padding: 16px; font-size: 15px; } }

/* PDF affiché dans une page (0.53.0) */
.pg-pdf-fig { margin: 0; }
.pg-pdf-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pg-pdf { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.pg-pdf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.pg-pdf-bar .spacer { flex: 1; }
.pg-pdf-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.pg-pdf-pages { display: flex; flex-direction: column; gap: 10px; padding: 10px; max-height: 85vh; overflow-y: auto; }
.pg-pdf-page { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); width: 100%; }
.pg-pdf-page canvas { display: block; width: 100%; height: auto; }
.pg-pdf-wait { padding: 30px 10px; text-align: center; }
@media (max-width: 860px) { .pg-pdf-pages { padding: 6px; gap: 6px; max-height: 75vh; } .pg-pdf-name { max-width: 100%; } }

/* ------------------------------------------------------------ Charte 2026 : détails communs (0.58.0) */
.page-head h1 { position: relative; padding-bottom: 7px; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--brand-orange); }
.card, .modal { border-radius: var(--r-md); }
.btn-primary { box-shadow: 0 1px 2px rgba(231,82,0,.25); }

/* ------------------------------------------------------------ Vue mobile (0.59.0, contrôlée sur Galaxy A36)
   Pages en grille : une colonne limitée à l'écran (sinon la page s'élargit à la taille de son contenu et Chrome la dézoome :
   Prévisionnel, Administration). Grands tableaux : défilement horizontal plutôt que des colonnes écrasées. */
@media (max-width: 760px) {
  .page-body { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .page-body > * { min-width: 0; }
  .admin-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .admin-grid > * { min-width: 0; }
  .admin-tabs { flex-wrap: wrap; max-width: 100%; }
  .card > table.list, .admin-grid table.list { display: block; max-width: 100%; overflow-x: auto; }
  .fc-period { font-size: 17px; }
  .fc-controls .spacer { display: none; }
  .fc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap > table.list:has(> thead th:nth-child(6)) { min-width: 760px; }
  .hub-kpi-l { font-size: 13px; }
  .hub-kpi-go { display: none; }
}

/* ------------------------------------------------------------ Profil, Mon compte, anniversaires (0.59.0) */
.fd-avatar.photo, .avatar.photo { background: var(--surface-2); overflow: hidden; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-avatar.xl { width: 104px; height: 104px; font-size: 34px; }
.side-me { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 6px 4px; border-radius: 8px; margin-bottom: 4px; min-width: 0; }
.side-me:hover { background: rgba(255,255,255,.07); }
.side-me .fd-avatar { width: 34px; height: 34px; font-size: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.side-me-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-me-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me-t span { font-size: 12px; color: #d3d9e4; }
.side-mini .side-me { justify-content: center; }
.side-mini .side-me-t { display: none; }
.acc { display: flex; flex-direction: column; gap: 16px; max-width: 1180px; }
.acc .card, .acc .install-guide { max-width: none; width: 100%; margin: 0; }
.acc-id { min-width: 0; }
.acc-id h2 { overflow-wrap: anywhere; }
.acc-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 24px; }
.acc-photo { position: relative; }
.acc-photo-edit { position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); background: var(--brand-orange); color: #fff; cursor: pointer; font-size: 15px; display: grid; place-items: center; }
.acc-id h2 { font-size: 24px; margin: 0; }
.acc-mail { margin: 2px 0 0; color: var(--ink-2); }
.acc-photo-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.acc-bday { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--tint-blue); min-width: 250px; }
.acc-bday-h { font-size: 14px; }
.acc-bday input[type=date] { max-width: 200px; }
.acc-bday .check { font-size: 12.5px; font-weight: 500; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acc-col > .card { margin: 0; }
.acc-card-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.acc-card-h h2 { font-size: 18px; margin: 0; }
.acc-card-h p { margin: 2px 0 0; }
.acc-h-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--tint-blue); color: var(--brand-orange); display: grid; place-items: center; }
.acc-h-ico svg { width: 20px; height: 20px; }
.acc-opts { display: flex; flex-direction: column; gap: 10px; }
.acc-opt { align-items: flex-start !important; font-weight: 500; line-height: 1.4; }
.acc-opt input { margin-top: 3px; flex: none; }
.acc-sub { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.acc-sub-h { font-size: 14px; margin: 0 0 10px; }
.acc-crop { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.acc-crop-stage { position: relative; width: 280px; height: 280px; border-radius: 12px; overflow: hidden; touch-action: none; }
.acc-crop-cv { width: 280px; height: 280px; display: block; cursor: grab; }
.acc-crop-cv:active { cursor: grabbing; }
.acc-crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(42,54,81,.45); outline: 2px solid #fff; outline-offset: -2px; }
.acc-crop-zoom { display: flex; align-items: center; gap: 10px; width: 260px; font-weight: 700; color: var(--muted); }
.acc-crop-zoom input { flex: 1; }
.hub-row-2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1fr) !important; }
.hub-bday { display: flex; align-items: center; gap: 12px; padding: 9px 4px; }
.hub-bday .fd-avatar { width: 40px; height: 40px; }
.hub-bday.today { background: linear-gradient(90deg, color-mix(in srgb, #E75200 12%, var(--surface)), transparent); border-radius: 10px; padding-left: 8px; }
.hub-bday-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hub-bday-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-bday-s { font-size: 12.5px; color: var(--muted); }
.hub-bday.today .hub-bday-s { color: var(--brand-orange); font-weight: 700; }
.hub-bday-d { flex: none; width: 44px; text-align: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 11px; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.hub-bday-day { display: block; font: 800 17px/1.4 var(--f-head); color: var(--ink); background: var(--surface-2); }
.fd-viewers { min-width: 240px; max-width: 320px; }
.fd-viewers-list { max-height: 300px; overflow-y: auto; }
.fd-viewer { display: flex; align-items: center; gap: 8px; padding: 5px 10px; }
.fd-viewer .fd-avatar { width: 28px; height: 28px; font-size: 11px; }
.fd-viewer-n { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1250px) { .hub-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } .hub-row-2 .hub-todo { grid-column: 1 / -1; } }
@media (max-width: 960px) {
  .acc-profile { grid-template-columns: auto minmax(0, 1fr); }
  .acc-bday { grid-column: 1 / -1; }
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hub-row-2 { grid-template-columns: minmax(0, 1fr) !important; }
  .acc-profile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 18px 14px; }
  .acc-photo-btns { justify-content: center; }
  .acc-bday { min-width: 0; width: 100%; text-align: left; }
}

/* ------------------------------------------------------------ Fil d'actualité BETA (0.58.0) */
.fd-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100%; }
.fd-side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fd-side-h { font: 800 19px/1.2 var(--f-head); padding: 2px 10px 12px; color: var(--ink); }
.fd-side-sub { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 10px 6px; }
.fd-cat-list { display: flex; flex-direction: column; gap: 1px; }
.fd-cat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fd-cat:hover { background: var(--surface-2); }
.fd-cat.on { background: var(--tint-blue); color: var(--blue); font-weight: 700; }
.fd-cat-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fd-cat-dot.all { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; color: var(--brand-orange); }
.fd-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cat-n { font-size: 12px; color: var(--muted); }
.fd-side-admin { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border-top: 1px solid var(--line-2); }
.fd-main { padding: 20px 24px 60px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.fd-main > * { width: 100%; max-width: 680px; }
.fd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fd-head h1 { font-size: 24px; display: flex; align-items: center; gap: 8px; }
.fd-head-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); }
.fd-head .spacer { flex: 1; }
.fd-search { max-width: 260px; min-height: 38px !important; border-radius: 20px !important; padding-left: 14px !important; }
.fd-cats-mobile { display: none; }
.fd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 3px rgba(42,54,81,.05); }
.fd-compose { padding: 14px 16px 8px; }
.fd-compose-row { display: flex; align-items: center; gap: 12px; }
.fd-compose-input { flex: 1; text-align: left; padding: 11px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-2); color: var(--muted); font: inherit; cursor: text; }
.fd-compose-input:hover { border-color: var(--ink-3); }
.fd-compose-tools, .fd-c-tools { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 4px; margin-top: 8px; }
.fd-compose-tools button, .fd-c-tools > button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: 600 13.5px/1 var(--f-body); color: var(--ink-2); cursor: pointer; }
.fd-compose-tools button:hover, .fd-c-tools > button:hover { background: var(--surface-2); }
.fd-ti { font-size: 17px; line-height: 1; }
.fd-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; display: grid; place-items: center; font: 800 14px/1 var(--f-head); }
.fd-avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.fd-list { display: flex; flex-direction: column; gap: 14px; }
.fd-post { overflow: hidden; }
.fd-post.pinned { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--line)); }
.fd-post-h { display: flex; align-items: center; gap: 11px; padding: 13px 14px 11px 16px; }
.fd-who { display: flex; flex-direction: column; min-width: 0; }
.fd-who strong { font-size: 15px; }
.fd-where { font-size: 13px; color: var(--muted); }
.fd-where-cat { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.fd-where-cat:hover { text-decoration: underline; }
.fd-post-h .spacer { flex: 1; }
.fd-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.fd-src { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, #2F80ED 14%, var(--surface)); color: #2a6fd0; }
.fd-pin { font-size: 15px; }
.fd-icon-btn { border: 0; background: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--muted); display: grid; place-items: center; flex: none; }
.fd-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.pop-item.danger { color: var(--danger); }
.fd-gal { display: grid; gap: 3px; background: var(--surface-2); }
.fd-gal.n1 { grid-template-columns: 1fr; }
.fd-gal.n2 { grid-template-columns: 1fr 1fr; }
.fd-gal.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.fd-gal.n3 .fd-gal-item:first-child { grid-row: 1 / 3; }
.fd-gal.n4 { grid-template-columns: 1fr 1fr; }
.fd-gal-item { position: relative; border: 0; padding: 0; margin: 0; background: #0d1220; cursor: zoom-in; overflow: hidden; display: block; min-height: 0; }
.fd-gal.n1 .fd-gal-item { max-height: 560px; }
.fd-gal.n1 img, .fd-gal.n1 video { width: 100%; max-height: 560px; object-fit: contain; display: block; margin: 0 auto; background: var(--surface-2); }
.fd-gal:not(.n1) .fd-gal-item { aspect-ratio: 1 / 1; }
.fd-gal.n3 .fd-gal-item { aspect-ratio: auto; }
.fd-gal:not(.n1) img, .fd-gal:not(.n1) video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.fd-gal-item:hover img { transform: scale(1.03); }
.fd-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 22px; pointer-events: none; }
.fd-gal-more { position: absolute; inset: 0; background: rgba(42,54,81,.62); color: #fff; display: grid; place-items: center; font: 800 30px/1 var(--f-head); }
.fd-body { padding: 14px 16px 4px; }
.fd-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.fd-text { font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.fd-text.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.fd-text a, .fd-com-text a { color: var(--blue); }
.fd-link { border: 0; background: none; padding: 4px 0; color: var(--blue); font: 600 13.5px/1.2 var(--f-body); cursor: pointer; }
.fd-docs { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px 2px; }
.fd-doc { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.fd-doc:hover { border-color: var(--brand-orange); }
.fd-doc-n { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-doc.sm { padding: 4px 8px; font-size: 12.5px; }
.fd-docs audio { width: 100%; }
.fd-stats { display: flex; align-items: center; gap: 14px; padding: 10px 16px; margin-top: 6px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); }
.fd-stats .spacer { flex: 1; }
.fd-stat { display: inline-flex; align-items: center; gap: 3px; }
.fd-stat-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.fd-stat-btn:hover { color: var(--ink); }
.fd-react-emo { letter-spacing: -3px; margin-right: 4px; }
.fd-like-wrap { position: relative; }
.fd-like { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 12px; border-radius: 18px; font: 700 14px/1 var(--f-body); color: var(--ink-2); cursor: pointer; }
.fd-like:hover { background: var(--surface-2); }
.fd-like.on { color: var(--brand-orange); background: var(--tint-blue); }
.fd-like-ico { font-size: 17px; }
.fd-like:not(.on) .fd-like-ico { filter: grayscale(1); opacity: .75; }
.fd-react-pick { position: absolute; right: 0; bottom: calc(100% + 6px); display: flex; gap: 2px; padding: 5px 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 8px 24px rgba(42,54,81,.18);
  opacity: 0; transform: translateY(6px) scale(.96); pointer-events: none; transition: opacity .15s .25s, transform .15s .25s; z-index: 5; }
.fd-like-wrap:hover .fd-react-pick, .fd-like-wrap:focus-within .fd-react-pick { opacity: 1; transform: none; pointer-events: auto; transition-delay: .35s; }
.fd-react-opt { border: 0; background: none; font-size: 26px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.fd-react-opt:hover { transform: scale(1.3) translateY(-3px); }
.fd-react-opt.on { background: var(--tint-blue); }
.fd-comments { padding: 4px 16px 12px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.fd-prev { align-self: flex-start; }
.fd-com { display: flex; gap: 8px; align-items: flex-start; }
.fd-com.reply { margin-left: 40px; }
.fd-com-main { min-width: 0; display: flex; flex-direction: column; }
.fd-bubble { background: var(--surface-2); border-radius: 14px; padding: 7px 12px 8px; align-self: flex-start; max-width: 100%; }
.fd-bubble-h { display: flex; align-items: baseline; gap: 8px; }
.fd-bubble-h strong { font-size: 13.5px; }
.fd-com-text { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.fd-com-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fd-com-img { border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: none; }
.fd-com-img img, .fd-com-img video { display: block; max-width: 220px; max-height: 180px; object-fit: cover; }
.fd-com-act { display: flex; align-items: center; gap: 6px; padding: 3px 0 0 10px; font-size: 12.5px; color: var(--muted); }
.fd-com-act button { border: 0; background: none; padding: 0; font: 700 12.5px/1.2 var(--f-body); color: var(--muted); cursor: pointer; }
.fd-com-act button:hover { color: var(--ink); text-decoration: underline; }
.fd-com-act button.on { color: var(--brand-orange); }
.fd-com-input { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.fd-com-bar { display: flex; align-items: flex-end; gap: 6px; }
.fd-com-field { flex: 1; min-width: 0; display: flex; align-items: flex-end; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 2px 4px 2px 12px; }
.fd-com-field:focus-within { border-color: var(--blue); }
.fd-com-field textarea { border: 0 !important; box-shadow: none !important; min-height: 34px !important; resize: none; padding: 7px 0 !important; background: transparent; font-size: 14px; line-height: 1.35; }
.fd-com-field .emoji-btn { width: 32px; min-height: 32px; border: 0; background: none; }
.fd-send { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--brand-orange); color: #fff; display: grid; place-items: center; cursor: pointer; }
.fd-send svg { width: 17px; height: 17px; }
.fd-send:disabled { opacity: .5; }
.fd-replying { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--blue); padding-left: 40px; }
.fd-replying button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.fd-com-prev { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 40px; }
.fd-com-prev:empty { display: none; }
.fd-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 4px 3px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.fd-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.fd-more { text-align: center; padding: 6px; }
.fd-empty { padding: 40px 20px; text-align: center; }
.fd-empty-ico { font-size: 40px; }
.fd-view { position: fixed; inset: 0; z-index: 990; background: rgba(8,11,20,.94); display: flex; align-items: center; justify-content: center; }
.fd-view-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 50px 70px; }
.fd-view-stage img, .fd-view-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.fd-view-nav, .fd-view-close, .fd-view-dl { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 26px; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.fd-view-nav:hover, .fd-view-close:hover, .fd-view-dl:hover { background: var(--brand-orange); }
.fd-view-nav.prev { left: 16px; top: 50%; transform: translateY(-50%); }
.fd-view-nav.next { right: 16px; top: 50%; transform: translateY(-50%); }
.fd-view-close { top: 14px; right: 16px; font-size: 20px; }
.fd-view-dl { top: 14px; right: 72px; font-size: 18px; }
.fd-view-count { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; }
.fd-composer { display: flex; flex-direction: column; gap: 10px; position: relative; }
.fd-composer.drag { outline: 3px dashed var(--brand-orange); outline-offset: 6px; border-radius: 10px; }
.fd-c-top { display: flex; align-items: center; gap: 10px; }
.fd-c-cat { width: auto !important; min-height: 30px !important; padding: 2px 8px !important; font-size: 13px; display: inline-block; }
.fd-c-title { font: 800 18px/1.3 var(--f-head) !important; border: 0 !important; box-shadow: none !important; padding: 6px 0 !important; border-bottom: 1px solid var(--line-2) !important; border-radius: 0 !important; }
.fd-c-body { border: 0 !important; box-shadow: none !important; padding: 6px 0 !important; min-height: 110px !important; font-size: 15px; line-height: 1.55; }
.fd-c-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.fd-c-files:empty { display: none; }
.fd-c-file { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.fd-c-file img, .fd-c-file video { width: 100%; height: 100%; object-fit: cover; }
.fd-c-ext { flex: 1; display: grid; place-items: center; font: 800 16px/1 var(--f-head); color: var(--brand-orange); }
.fd-c-fname { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; background: rgba(42,54,81,.75); color: #fff; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-c-rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; }
.fd-c-drop { text-align: center; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.fd-c-tools { justify-content: flex-start; border-top: 1px solid var(--line-2); padding-top: 8px; }
.fd-c-tools .spacer { flex: 1; }
.fd-cat-edit { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; margin-bottom: 10px; }
.fd-cat-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 70px auto auto auto; gap: 8px; align-items: center; }
.fd-cat-row input:not([type=checkbox]):not([type=color]) { min-height: 34px; padding: 4px 8px; }
.fd-cat-row input[type=color] { width: 46px; height: 34px; }
.fd-single .fd-post { border: 0; box-shadow: none; }
.badge-feed { background: var(--brand-orange); color: #fff; }
@media (max-width: 860px) {
  .fd-page { grid-template-columns: minmax(0, 1fr); }
  .fd-side { display: none; }
  .fd-main { padding: 12px 10px 90px; gap: 10px; }
  .fd-cats-mobile { display: block; }
  .fd-search { max-width: none; flex: 1 1 100%; }
  .fd-head h1 { font-size: 20px; }
  .fd-compose-tools button { padding: 8px 6px; font-size: 12.5px; }
  .fd-com.reply, .fd-replying, .fd-com-prev { margin-left: 0; padding-left: 0; }
  .fd-view-stage { padding: 50px 6px; }
  .fd-cat-row { grid-template-columns: 40px minmax(0, 1fr) auto auto; }
  .fd-cat-row .muted { display: none; }
}

/* ------------------------------------------------------------ Hub (0.56.0) — charte LOISON 2026 */
.hub { --lo-ink: #2A3651; --lo-orange: #E75200; --lo-steel: #7B8494; --lo-tint: color-mix(in srgb, #E75200 9%, var(--surface));
  --lo-head: #2A3651; display: flex; flex-direction: column; gap: 18px; max-width: 1500px; }
[data-theme="dark"] .hub { --lo-head: #eef2f6; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .hub { --lo-head: #eef2f6; } }
.hub h1, .hub h2, .hub h3, .hub-kpi-v, .hub-brand { font-family: Manrope, var(--f-body); }
.hub-bar { display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--lo-orange); }
.hub-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 190px; }
.hub-hero-txt { padding: 26px 30px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hub-hero h1 { margin: 4px 0 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; line-height: 1.15; color: var(--lo-head); letter-spacing: -.01em; }
.hub-brand { white-space: nowrap; }
.hub-brand span { color: var(--lo-orange); }
.hub-hero p { margin: 0; font-size: 17px; color: var(--muted); }
.hub-date { font-size: 13px; font-weight: 600; color: var(--lo-steel); text-transform: uppercase; letter-spacing: .06em; }
.hub-art { position: relative; background: var(--lo-ink); min-height: 190px; }
.hub-art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hub-slogan { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); padding-left: 16px; border-left: 2px solid rgba(255,255,255,.7);
  color: #fff; font: 700 14px/1.75 Manrope, var(--f-body); letter-spacing: .22em; text-transform: uppercase; }
.hub-slogan .hub-bar { margin-top: 8px; }
.hub-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hub-kpi { display: flex; align-items: flex-start; gap: 14px; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .12s, box-shadow .12s; }
.hub-kpi:hover { border-color: var(--lo-orange); box-shadow: 0 4px 16px rgba(42,54,81,.08); }
.hub-kpi-ico { width: 44px; height: 44px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--lo-tint); color: var(--lo-orange); }
.hub-kpi-ico svg { width: 24px; height: 24px; }
.hub-kpi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hub-kpi-l { font-size: 14px; font-weight: 600; color: var(--ink-2, var(--ink)); }
.hub-kpi-v { font-size: 30px; font-weight: 800; line-height: 1.15; color: var(--lo-head); }
.hub-kpi-s { font-size: 12.5px; color: var(--muted); }
.hub-kpi-s.bad { color: var(--danger); font-weight: 600; }
.hub-kpi-go, .hub-go { color: var(--muted); font-size: 22px; line-height: 1; }
.hub-row { display: grid; gap: 18px; align-items: start; }
.hub-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hub-row-3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.hub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.hub-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hub-card-h h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--lo-head); position: relative; padding-bottom: 7px; }
.hub-card-h h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 26px; height: 3px; border-radius: 2px; background: var(--lo-orange); }
.hub-card-h .spacer { flex: 1; }
.hub-more { border: 0; background: none; color: var(--lo-head); font: 600 13px/1.2 var(--f-body); cursor: pointer; text-decoration: none; padding: 4px 0; white-space: nowrap; }
.hub-more:hover { color: var(--lo-orange); }
.hub-empty { padding: 22px 8px; text-align: center; color: var(--muted); }
.hub-list { display: flex; flex-direction: column; }
.hub-list > * + * { border-top: 1px solid var(--line-2, var(--line)); }
.hub-proj { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; width: 100%; }
.hub-proj:hover, .hub-task:hover { background: var(--lo-tint); }
.hub-proj-color { width: 6px; align-self: stretch; border-radius: 3px; flex: none; }
.hub-proj-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-proj-t { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.hub-proj-t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-proj-s, .hub-proj-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-proj-next { flex: none; display: flex; flex-direction: column; gap: 1px; padding-left: 14px; border-left: 1px solid var(--line); min-width: 150px; font-size: 13.5px; }
.hub-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.hub-lbl svg { width: 14px; height: 14px; }
.hub-pill { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: color-mix(in srgb, var(--lo-steel) 16%, var(--surface)); color: var(--lo-head); }
.hub-pill.ok { background: color-mix(in srgb, #2e8b57 16%, var(--surface)); color: #23714a; }
.hub-task { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; width: 100%; }
.hub-box { width: 17px; height: 17px; flex: none; border: 2px solid var(--lo-steel); border-radius: 4px; }
.hub-task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hub-task-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-task-s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-due { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2, var(--ink)); min-width: 92px; }
.hub-due svg { width: 14px; height: 14px; color: var(--muted); }
.hub-due.late { color: var(--danger); font-weight: 700; }
.hub-prio { flex: none; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 12px; min-width: 70px; text-align: center; }
.hub-prio.urg { background: color-mix(in srgb, #c62828 14%, var(--surface)); color: #b3261e; }
.hub-prio.high { background: color-mix(in srgb, #E75200 14%, var(--surface)); color: #c24400; }
.hub-prio.mid { background: color-mix(in srgb, #f0a030 16%, var(--surface)); color: #9a5b00; }
.hub-prio.low { background: color-mix(in srgb, #2f6fd0 12%, var(--surface)); color: #2a5db0; }
.hub-news { position: relative; }
.hub-news-slide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; min-height: 190px; }
.hub-news-img { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--lo-ink); min-height: 170px; }
.hub-news-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hub-news-img.ph { display: grid; place-items: center; }
.hub-news-img.ph span { width: 64px; height: 64px; border-radius: 16px; background: #2F80ED; color: #fff; display: grid; place-items: center; font: 800 34px/1 Manrope, var(--f-body); }
.hub-news-count { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.hub-news-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hub-news-date { font-size: 12.5px; color: var(--muted); }
.hub-news-txt h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--lo-head); line-height: 1.25; }
.hub-news-txt p { margin: 0; font-size: 13.5px; color: var(--ink-2, var(--ink)); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.hub-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.hub-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.hub-dot.on { background: var(--lo-orange); width: 18px; border-radius: 4px; }
.hub-arrow { position: absolute; top: 80px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hub-arrow.prev { left: -8px; } .hub-arrow.next { right: -8px; }
.hub-news:hover .hub-arrow { opacity: 1; }
.hub-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-tool { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); min-width: 0; transition: border-color .12s, box-shadow .12s; }
.hub-tool:hover { border-color: var(--lo-orange); box-shadow: 0 3px 12px rgba(42,54,81,.08); }
.hub-tool-logo { width: 46px; height: 46px; flex: none; border-radius: 9px; color: #fff; display: grid; place-items: center; font: 800 14px/1 Manrope, var(--f-body); letter-spacing: -.02em; }
.hub-tool-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hub-tool-txt strong { font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.hub-tool-txt span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-tool-go { color: var(--muted); font-size: 13px; }
.hub-tool-logo.img { background: #fff; border: 1px solid var(--line); padding: 6px; }
.hub-tool-logo.img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hub-tool:hover .hub-tool-logo { transform: scale(1.06); }
.hub-tool-logo { transition: transform .15s; box-shadow: 0 1px 3px rgba(42,54,81,.12); }
.hub-arrival { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
a.hub-arrival:hover { background: var(--lo-tint); }
.hub-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 15px/1 Manrope, var(--f-body); overflow: hidden; }
.hub-avatar.img { background: var(--surface-2); }
.hub-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-arrival-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hub-arrival-main strong { font-size: 14.5px; }
.hub-arrival-s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-arrival-t { font-size: 12.5px; color: var(--ink-2, var(--ink)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-arrival-d { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--muted); }
.hub-pill.new { background: var(--lo-tint); color: var(--lo-orange); }
.pl-switch-bar { padding: 12px 24px 0; }
.pl-switch-bar .pill-seg button { display: inline-flex; align-items: center; gap: 6px; }
.pl-switch-bar .pill-seg svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .pl-switch-bar { padding: 10px 12px 0; } }
.hub-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-photo { display: flex; flex-direction: column; gap: 3px; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: zoom-in; min-width: 0; }
.hub-photo-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.hub-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.hub-photo:hover img { transform: scale(1.04); }
.hub-photo-tag { position: absolute; left: 6px; bottom: 6px; background: var(--lo-orange); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.hub-photo-t { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-photo-s { font-size: 11.5px; color: var(--muted); }
.hub-linkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; background: var(--lo-ink); border-radius: 12px; }
.hub-linkbar-l { color: #fff; font: 700 13px/1 Manrope, var(--f-body); text-transform: uppercase; letter-spacing: .08em; margin-right: 8px; padding-left: 10px; border-left: 3px solid var(--lo-orange); }
.hub-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
.hub-chip:hover { background: var(--lo-orange); }
.hub-chip span { opacity: .7; font-size: 11px; }
.hub-edit-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 60vh; overflow: auto; }
.hub-edit-row { display: grid; grid-template-columns: 84px 1.1fr 1.2fr 2fr 120px 64px 44px auto auto; gap: 6px; align-items: center; }
.hub-edit-row input, .hub-edit-row select { min-height: 34px !important; padding: 4px 8px !important; font-size: 13px; min-width: 0; }
.hub-edit-row input[type=color] { padding: 2px !important; height: 34px; }
/* Top contributeurs (0.83.0, compact + filtres en 0.84.0) et Ligue 1 (0.84.0), côte à côte */
.hub-row-duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.hub-top, .hub-foot { display: flex; flex-direction: column; gap: 8px; }
.hub-top .hub-card-h, .hub-foot .hub-card-h { margin-bottom: 0; }
.hub-lb-period, .hub-lb-svc { min-height: 30px !important; padding: 2px 8px !important; font-size: 13px; border-radius: 8px; max-width: 170px; }
.hub-lb-seg button { min-height: 26px; padding: 0 10px; font-size: 12.5px; }
.hub-lb-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.ft-period { margin: 6px 0 2px; }
.hub-lb-chips { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.hub-lb-chips::-webkit-scrollbar { display: none; }
.hub-lb-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2, var(--ink));
  font: 600 12px/1 var(--f-body); padding: 5px 9px; border-radius: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.hub-lb-chip i { width: 8px; height: 8px; border-radius: 50%; }
.hub-lb-chip b { font-weight: 800; color: var(--muted); font-size: 11px; }
.hub-lb-chip:hover { border-color: var(--lo-orange); }
.hub-lb-chip.on { background: var(--lo-head); border-color: var(--lo-head); color: #fff; }
.hub-lb-chip.on b { color: rgba(255,255,255,.75); }
.hub-lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; padding-top: 6px; }
.hub-lb-step { display: flex; flex-direction: column; min-width: 0; cursor: default; }
.hub-lb-who { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0 2px 6px; text-align: center; min-width: 0; }
.hub-lb-who strong { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lo-head); }
.hub-lb-ava { position: relative; display: inline-grid; margin-bottom: 3px; }
.hub-lb-ava .fd-avatar { width: 40px; height: 40px; font-size: 14px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring, var(--line)); }
.hub-lb-step.pos1 .hub-lb-ava .fd-avatar { width: 50px; height: 50px; font-size: 17px; }
.hub-lb-ava.ghost { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed var(--line); color: var(--muted); place-items: center; font-weight: 800; }
.hub-lb-medal { position: absolute; right: -7px; bottom: -5px; font-size: 17px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.hub-lb-step.m1 .hub-lb-medal { font-size: 20px; animation: hubBob 2.6s ease-in-out infinite; }
.hub-lb-pts { font: 800 15px/1.15 Manrope, var(--f-body); color: var(--lo-orange); }
.hub-lb-step.m1 .hub-lb-pts { font-size: 17px; }
.hub-lb-block { position: relative; display: grid; place-items: center; border-radius: 8px 8px 3px 3px; color: #fff; font: 800 20px/1 Manrope, var(--f-body); overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); transform-origin: bottom; }
.hub-lb-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; }
.hub-lb-step.m1 .hub-lb-block::after { animation: hubShine 4.5s ease-in-out 1.6s infinite; }
.hub-lb-step.pos1 .hub-lb-block { height: 54px; } .hub-lb-step.pos2 .hub-lb-block { height: 38px; } .hub-lb-step.pos3 .hub-lb-block { height: 28px; }
.hub-lb-step.m1 { --c1: #F7C948; --c2: #E09B00; --ring: #F2B705; }
.hub-lb-step.m2 { --c1: #C9D1DC; --c2: #8E99A8; --ring: #AEB8C5; }
.hub-lb-step.m3 { --c1: #E3A06B; --c2: #B4652D; --ring: #CD7F32; }
.hub-lb-step.empty .hub-lb-block { --c1: var(--surface-2); --c2: var(--surface-2); color: var(--muted); box-shadow: none; border: 1px dashed var(--line); }
.hub-lb-step.me .hub-lb-who strong { color: var(--lo-orange); }
.hub-lb-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-lb-row { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 5px 8px 5px 4px; border-radius: 8px; transition: background .15s, transform .15s; }
.hub-lb-row:hover { background: var(--lo-tint); transform: translateX(2px); }
.hub-lb-row.me { background: var(--lo-tint); box-shadow: inset 3px 0 0 var(--lo-orange); }
.hub-lb-row.link { cursor: pointer; }
.hub-lb-row.link:focus-visible { outline: 2px solid var(--lo-orange); outline-offset: 1px; }
.hub-lb-row .fd-avatar { width: 30px; height: 30px; font-size: 11px; }
.hub-lb-svcdot { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 13px/1 Manrope, var(--f-body); }
.hub-lb-rank { font: 800 14px/1 Manrope, var(--f-body); color: var(--lo-steel); text-align: center; }
.hub-lb-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-lb-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hub-lb-name strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-lb-row.me .hub-lb-name strong { color: var(--lo-orange); }
.hub-lb-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-lb-score { font: 800 15px/1 Manrope, var(--f-body); color: var(--lo-head); white-space: nowrap; }
.hub-lb-score small { font-size: 11px; font-weight: 600; color: var(--muted); }
.hub-lb-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); transform-origin: left; }
.hub-lb-bar > span { min-width: 3px; height: 100%; }
.hub-lb-mv { flex: none; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.hub-lb-mv.up { background: color-mix(in srgb, #2e8b57 16%, var(--surface)); color: #23714a; }
.hub-lb-mv.down { background: color-mix(in srgb, #c62828 13%, var(--surface)); color: #b3261e; }
.hub-lb-mv.new { background: var(--lo-tint); color: var(--lo-orange); }
.hub-lb-mv.eq { color: var(--muted); }
.hub-lb-me { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px; font-size: 12.5px; margin-top: auto;
  background: linear-gradient(90deg, color-mix(in srgb, #E75200 12%, var(--surface)), var(--surface-2)); color: var(--ink); }
.hub-lb-me strong { color: var(--lo-orange); }
.hub-lb-me-ico { font-size: 16px; line-height: 1; }
.hub-lb-note { margin-top: -2px; }
.hub-top.anim .hub-lb-block { animation: hubRise .7s cubic-bezier(.2, .9, .3, 1.15) var(--d) both; }
.hub-top.anim .hub-lb-who { animation: hubPop .45s ease-out calc(var(--d) + .4s) both; }
.hub-top.anim .hub-lb-bar { animation: hubGrow .8s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0s) + .3s) both; }
.hub-top.anim .hub-lb-row { animation: hubSlide .4s ease-out var(--d) both; }
.hub-top.anim .hub-lb-me { animation: hubPop .45s ease-out 1s both; }
@keyframes hubRise { from { transform: scaleY(0); } }
@keyframes hubPop { from { opacity: 0; transform: translateY(10px) scale(.94); } }
@keyframes hubGrow { from { transform: scaleX(0); } }
@keyframes hubSlide { from { opacity: 0; transform: translateX(-12px); } }
@keyframes hubBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-8deg); } }
@keyframes hubShine { 0% { background-position: 120% 0; } 30%, 100% { background-position: -120% 0; } }
/* Ligue 1 */
.ft-tabs { align-self: flex-start; }
.ft-scroll { max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.ft-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ft-table th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; padding: 4px 6px; text-align: center; }
.ft-table td { padding: 4px 6px; text-align: center; border-top: 1px solid var(--line-2, var(--line)); white-space: nowrap; }
.ft-table .l { text-align: left; }
.ft-table tr:hover td { background: var(--lo-tint); }
.ft-rank { font-weight: 800; color: var(--lo-steel); }
.ft-pts { font-weight: 800; color: var(--lo-head); }
.ft-club { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.ft-logo { width: 20px; height: 20px; object-fit: contain; flex: none; }
.ft-logo.ph { display: inline-grid; place-items: center; font-size: 8px; font-weight: 800; background: var(--surface-2); border-radius: 50%; color: var(--muted); }
.ft-note { padding-top: 4px; }
.ft-list { display: flex; flex-direction: column; }
.ft-sec { position: sticky; top: 0; z-index: 1; background: var(--surface); font: 700 11px/1 var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 2px 5px; }
.ft-match { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto minmax(0, 1fr) 58px; align-items: center; gap: 6px; padding: 5px 4px; border-top: 1px solid var(--line-2, var(--line)); font-size: 12.5px; }
.ft-match.live { background: color-mix(in srgb, #c62828 6%, var(--surface)); }
.ft-when { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-team { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.ft-team > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-team.home { justify-content: flex-end; text-align: right; }
.ft-score { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ft-score.res { font: 800 14px/1 Manrope, var(--f-body); color: var(--lo-head); min-width: 48px; justify-content: center; }
.ft-in { width: 38px !important; min-height: 28px !important; padding: 2px 4px !important; text-align: center; font: 800 14px/1 Manrope, var(--f-body); border-radius: 7px; -moz-appearance: textfield; }
.ft-in::-webkit-inner-spin-button, .ft-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ft-in:focus { border-color: var(--lo-orange); }
/* pronostic 1 / N / 2 en un clic (1.02.0) */
.ft-picks { display: inline-flex; gap: 3px; }
.ft-pick { width: 28px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink-2);
  font: 800 13px/1 Manrope, var(--f-body); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.ft-pick:hover { border-color: var(--lo-orange, #E75200); color: var(--ink); }
.ft-pick[aria-pressed="true"] { background: var(--lo-orange, #E75200); border-color: var(--lo-orange, #E75200); color: #fff; }
.ft-pick:focus-visible { outline: 2px solid var(--lo-orange, #E75200); outline-offset: 1px; }
.hub-grid .hub-foot .ft-pick { width: 24px; height: 22px; font-size: 12px; border-radius: 6px; }
.ft-ok { justify-self: start; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ft-ok.on { background: color-mix(in srgb, #2e8b57 16%, var(--surface)); color: #23714a; animation: hubPop .3s ease-out; }
.ft-mine { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ft-won { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.ft-won.p1 { background: color-mix(in srgb, #2f80ed 14%, var(--surface)); color: #2a5db0; }
.ft-won.p3 { background: color-mix(in srgb, #2e8b57 18%, var(--surface)); color: #23714a; }
.ft-livechip { font: 800 11.5px/1 var(--f-body); color: #c62828; background: color-mix(in srgb, #c62828 10%, var(--surface)); padding: 4px 9px; border-radius: 10px; animation: ftPulse 1.6s ease-in-out infinite; }
@keyframes ftPulse { 50% { opacity: .55; } }
.ft-rules { border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 12.5px; }
.ft-rules summary { cursor: pointer; font-weight: 700; padding: 7px 0; color: var(--lo-head); }
.ft-rules[open] { padding-bottom: 8px; }
.ft-rule-list { margin: 0 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ft-rule-list li.on { color: var(--lo-head); }
.ft-rule-ex-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.ft-rule-ex-list li { display: flex; align-items: center; gap: 6px; }
.ft-rule-ex { font-weight: 600; }
/* Utilisateurs › Profils d'autorisations et BETA (0.86.0) */
.prf-modal, .uf-modal, .ro-banner, .users-table { --lo-orange: #E75200; --lo-tint: color-mix(in srgb, #E75200 9%, var(--surface)); --lo-head: #2A3651; }
[data-theme="dark"] .prf-modal { --lo-head: #eef2f6; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .prf-modal { --lo-head: #eef2f6; } }
.ro-banner { margin: 10px 24px 0; padding: 8px 14px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, #2f80ed 10%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, #2f80ed 30%, var(--line)); }
@media (max-width: 760px) { .ro-banner { margin: 8px 12px 0; } }
.prf-modal { width: min(1040px, 96vw) !important; max-width: none !important; }
.prf-tabs { margin-bottom: 12px; }
.prf-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.prf-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; }
.prf-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.prf-item:hover { border-color: var(--lo-orange); }
.prf-item.on { border-color: var(--lo-orange); background: var(--lo-tint); box-shadow: inset 3px 0 0 var(--lo-orange); }
.prf-item.new { font-weight: 700; color: var(--lo-head); border-style: dashed; }
.prf-edit { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.prf-presets { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.prf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prf-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--muted); padding: 4px 8px; }
.prf-table td { padding: 6px 8px; border-top: 1px solid var(--line-2, var(--line)); vertical-align: middle; }
.prf-sec { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.prf-seg { display: inline-flex; background: var(--paper); border-radius: 9px; padding: 3px; gap: 2px; }
.prf-seg button { border: 0; background: transparent; min-height: 28px; padding: 0 12px; border-radius: 7px; cursor: pointer; font: 600 12.5px/1 var(--f-body); color: var(--ink-3, var(--muted)); }
.prf-seg button:hover { color: var(--ink); }
.prf-seg button.on.lv-none { background: #b3261e; color: #fff; }
.prf-seg button.on.lv-read { background: #2a5db0; color: #fff; }
.prf-seg button.on.lv-write { background: #23714a; color: #fff; }
.prf-actions { display: flex; align-items: center; gap: 8px; }
.prf-chip { display: inline-block; margin-left: 6px; border: 0; cursor: pointer; font: 700 11px/1.6 var(--f-body); padding: 0 8px; border-radius: 9px; background: color-mix(in srgb, #2a5db0 12%, var(--surface)); color: #2a5db0; }
.prf-chip.off { opacity: .55; text-decoration: line-through; }
.prf-beta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.prf-beta h3 { margin: 0 0 4px; font-size: 15px; color: var(--lo-head); }
.prf-beta-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 10px; max-height: 50vh; overflow-y: auto; }
.prf-beta-row { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 8px; }
.prf-beta-row:hover { background: var(--lo-tint); }
.prf-beta-row .fd-avatar { width: 26px; height: 26px; font-size: 10px; }
.prf-sw { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.prf-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.prf-sw span { position: absolute; inset: 0; border-radius: 10px; background: var(--line); transition: background .15s; }
.prf-sw span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.prf-sw input:checked + span { background: var(--lo-orange); }
.prf-sw input:checked + span::after { transform: translateX(16px); }
.prf-sw input:focus-visible + span { outline: 2px solid var(--lo-orange); outline-offset: 2px; }
@media (max-width: 860px) { .prf-grid, .prf-beta { grid-template-columns: minmax(0, 1fr); } .prf-list { position: static; } }
/* Utilisateurs › fiche d'un compte (1.44.0) : rubriques à gauche, cartes à droite */
.modal.uf-modal { width: min(960px, 96vw); max-width: none; height: min(720px, calc(100vh - 32px)); height: min(720px, calc(100dvh - 32px)); display: flex; flex-direction: column; overflow: hidden; }
.uf-modal .modal-body { flex: 1; min-height: 0; overflow: hidden; padding-top: 4px; }
.uf { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.uf-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--paper); }
.uf-head .fd-avatar { width: 40px; height: 40px; font-size: 14px; flex: none; }
.uf-head-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.uf-head-t strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uf-head-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.uf-head-tags .prf-chip { margin-left: 0; cursor: default; }
.uf-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px; min-height: 0; flex: 1; }
.uf-nav { display: flex; flex-direction: column; gap: 2px; }
.uf-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; min-height: 40px; padding: 0 12px; border-radius: 9px; cursor: pointer; font: 600 14px/1.2 var(--f-body); color: var(--ink-2); }
.uf-nav button:hover { background: var(--line-2); }
.uf-nav button.on { background: var(--tint-blue); color: var(--ink); box-shadow: inset 3px 0 0 var(--signal); }
.uf-stage { overflow-y: auto; min-height: 0; padding-right: 4px; }
.uf-pane { display: flex; flex-direction: column; gap: 12px; padding-bottom: 4px; }
.uf-card { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.uf-card h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.uf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.uf-grid .full { grid-column: 1 / -1; }
.uf-field { display: flex; flex-direction: column; gap: 5px; }
.uf-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.uf-hint { font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.uf-intro { margin: 0; }
.uf-opt { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; cursor: pointer; font-weight: 400; }
.uf-opt + .uf-opt { border-top: 1px solid var(--line-2); padding-top: 10px; }
.uf-opt .prf-sw { margin-top: 1px; }
.uf-opt.off { opacity: .55; cursor: default; }
.uf-opt-t .fd-adm-chip { margin-left: 6px; }
.uf-opt-t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink); }
.uf-opt-t .beta-chip, .uf-opt-t .ins-chip { margin-left: 2px; }
.uf-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.uf-choice { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; font: 400 14px/1.3 var(--f-body); color: var(--ink); }
.uf-choice > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.uf-choice:hover { border-color: var(--muted); }
.uf-choice.on { border-color: var(--signal); background: var(--tint-blue); }
.uf-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 1px; }
.uf-choice.on .uf-dot { border-color: var(--signal); box-shadow: inset 0 0 0 3px var(--surface); background: var(--signal); }
.uf-profs { display: flex; flex-direction: column; gap: 6px; }
.uf-profs.off { opacity: .55; }
.uf-prof { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; font-weight: 400; }
.uf-prof:hover { border-color: var(--line); }
.uf-prof.on { border-color: var(--signal); background: var(--tint-blue); }
.uf-prof input { width: 17px; height: 17px; flex: none; accent-color: var(--signal); }
.uf-prof-t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.uf-prof-n { white-space: nowrap; }
.uf-eff { border-top: 1px dashed var(--line); padding-top: 10px; }
.uf-eff-h { font-size: 13.5px; margin-bottom: 8px; }
.uf-eff-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.uf-eff-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--line-2); }
.uf-lv { font: 700 11px/1.7 var(--f-body); padding: 0 8px; border-radius: 9px; white-space: nowrap; }
.uf-lv.lv-none { background: var(--tint-red); color: var(--danger); }
.uf-lv.lv-read { background: color-mix(in srgb, #2a5db0 14%, var(--surface)); color: #2a5db0; }
.uf-lv.lv-write { background: color-mix(in srgb, #23714a 14%, var(--surface)); color: #23714a; }
[data-theme="dark"] .uf-lv.lv-read { color: #8fb3ef; }
[data-theme="dark"] .uf-lv.lv-write { color: #7fd1a6; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .uf-lv.lv-read { color: #8fb3ef; } :root[data-theme="auto"] .uf-lv.lv-write { color: #7fd1a6; } }
@media (max-width: 720px) {
  .modal.uf-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .uf-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .uf-stage { overflow-y: auto; }
  .uf-nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .uf-nav button { flex: none; min-height: 36px; padding: 0 10px; font-size: 13px; gap: 6px; }
  .uf-nav button.on { box-shadow: inset 0 -3px 0 var(--signal); }
  .uf-grid { grid-template-columns: minmax(0, 1fr); }
  .uf-head-tags { display: none; }
}
/* Utilisateurs › Services */
.users-svc { min-height: 30px !important; padding: 2px 8px !important; font-size: 13px; max-width: 170px; }
.svc-edit-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 55vh; overflow: auto; }
.svc-edit-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto auto auto; gap: 6px; align-items: center; }
.svc-edit-row input[type=color] { padding: 2px !important; height: 34px; width: 44px; }
@media (prefers-reduced-motion: reduce) { .hub-top *, .hub-top.anim *, .hub-foot * { animation: none !important; } }
@media (max-width: 1050px) { .hub-row-duo { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ft-match { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px; }
  .ft-when { grid-column: 1 / -1; }
  .ft-team > span { font-size: 12px; }
}
@media (max-width: 1250px) { .hub-row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hub-row-3 .hub-newscard { grid-column: 1 / -1; } }
@media (max-width: 1050px) { .hub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hub-row-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hub { gap: 12px; }
  .hub-hero { grid-template-columns: 1fr; }
  .hub-art { min-height: 110px; }
  .hub-hero-txt { padding: 18px; }
  .hub-kpis { gap: 8px; }
  .hub-kpi { padding: 12px; gap: 10px; }
  .hub-kpi-ico { width: 36px; height: 36px; }
  .hub-kpi-v { font-size: 24px; }
  .hub-row-3 { grid-template-columns: minmax(0, 1fr); }
  .hub-news-slide { grid-template-columns: 1fr; }
  .hub-proj-next { min-width: 0; padding-left: 8px; }
  .hub-proj-next .muted { display: none; }
  .hub-due { min-width: 0; }
  .hub-prio { display: none; }
  .hub-edit-row { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------ Recherche (0.55.0) */
.nav-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 12px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-sm);
  background: rgba(255,255,255,.06); color: #d3d9e4; cursor: pointer; font: inherit; text-align: left; }
.nav-search:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-search svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.nav-search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-search kbd { font: 600 10.5px/1 var(--f-body); padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,.12); color: #d3d9e4; }
.side-mini .nav-search { justify-content: center; padding: 9px 0; }
.side-mini .nav-search span, .side-mini .nav-search kbd { display: none; }
.srch-ov { position: fixed; inset: 0; z-index: 940; background: rgba(42,54,81,.42); display: flex; justify-content: center; align-items: flex-start; padding: 7vh 16px 16px; animation: sheet-fade .12s ease-out; }
.srch { width: min(780px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.srch-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.srch-lens svg { width: 22px; height: 22px; color: var(--muted); display: block; }
.srch-input { flex: 1; min-width: 0; border: 0 !important; outline: none; box-shadow: none !important; background: transparent; font-size: 18px; padding: 4px 0 !important; color: var(--ink); }
.srch-input::-webkit-search-cancel-button { cursor: pointer; }
.srch-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 14px; border-bottom: 1px solid var(--line-2, var(--line)); font-size: 13.5px; }
.srch-opts .spacer { flex: 1; }
.srch-adv-btn[aria-expanded="true"] { background: var(--tint-blue); color: var(--blue); }
.srch-adv { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.srch-adv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.srch-adv-l { width: 104px; font-weight: 600; font-size: 13px; }
.srch-adv select, .srch-adv input[type=date] { min-height: 32px !important; padding: 3px 8px !important; font-size: 13.5px; max-width: 280px; }
.srch-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.srch-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.srch-chip svg { width: 14px; height: 14px; }
.srch-chip[aria-pressed="true"] { background: var(--tint-blue); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.srch-chip:hover { border-color: var(--blue); }
.srch-tip { line-height: 1.45; }
.srch-results { overflow-y: auto; padding: 4px 0 10px; min-height: 80px; }
.srch-empty { padding: 26px 16px; text-align: center; }
.srch-group + .srch-group { border-top: 1px solid var(--line-2, var(--line)); }
.srch-gh { display: flex; align-items: center; gap: 6px; padding: 10px 16px 4px; font: 700 12px/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3, var(--muted)); }
.srch-gh svg { width: 15px; height: 15px; }
.srch-gh .spacer { flex: 1; }
.srch-gh .btn { text-transform: none; letter-spacing: 0; min-height: 26px; }
.srch-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 7px 16px; border: 0; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.srch-item.static { cursor: default; }
.srch-item:not(.static):hover, .srch-item.active { background: var(--tint-blue); }
.srch-ico { flex: none; width: 22px; padding-top: 2px; color: var(--muted); display: grid; place-items: center; }
.srch-ico svg { width: 18px; height: 18px; }
.srch-ico .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; }
.srch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.srch-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-snip { font-size: 13px; color: var(--ink-2, var(--ink)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srch-right { flex: none; font-size: 12px; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.srch mark { background: color-mix(in srgb, #f5c542 55%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.msg.msg-hit { animation: msg-hit 4s ease-out; }
@keyframes msg-hit { 0%, 60% { background: color-mix(in srgb, #f5c542 35%, transparent); } 100% { background: transparent; } }
@media (max-width: 760px) {
  .srch-ov { padding: 0; }
  .srch { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .srch-adv-l { width: 100%; }
  .srch-right { display: none; }
}

/* ------------------------------------------------------------ Menu en arborescence (0.51.0) */
.nav-group { display: grid; gap: 2px; }
.nav .nav-group-head { font-weight: 600; color: #aeb9c2; }
.nav-caret { margin-left: auto; font-size: 11px; transition: transform .15s; opacity: .7; }
.nav-group.closed .nav-caret { transform: rotate(-90deg); }
.nav-group-items { display: grid; gap: 2px; margin-left: 19px; padding-left: 6px; border-left: 1px solid rgba(255,255,255,.12); }
.nav-group-items button { padding-top: 8px; padding-bottom: 8px; }
.nav-group-items button[aria-current=page]::before { left: -19px; }
.nav-group-items .nav-group-items { margin-left: 14px; }
.nav-group-items .nav-group-items button[aria-current=page]::before { left: -14px; }
.nav-group-items .nav-group-head { padding-top: 8px; padding-bottom: 8px; }
.nav-group.closed .nav-group-items { display: none; }
.nav-group.closed:has([aria-current=page]) .nav-group-head { color: #fff; background: rgba(255,255,255,.06); }
.side-mini .nav-group-items { margin-left: 0; padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 2px; }
.side-mini .nav-group-items button[aria-current=page]::before { left: -8px; }
.side .nav { overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; margin: 0 -12px; padding: 0 12px; }
.side-mini .side .nav { margin: 0 -8px; padding: 0 8px; }

/* organisation du menu */
.mt-tree { display: flex; flex-direction: column; gap: 4px; max-width: 900px; }
.mt-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 44px; position: relative; }
.mt-row.mt-group { background: var(--surface-2); font-weight: 600; margin-top: 6px; }
.mt-row { margin-left: calc(var(--d, 0) * 34px); }
.mt-row.mt-group[aria-level="2"] { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.mt-row.mt-empty { border-style: dashed; min-height: 36px; }
.mt-row .spacer { flex: 1; }
.mt-handle { cursor: grab; color: var(--muted); letter-spacing: -2px; user-select: none; padding: 0 2px; }
.mt-ico svg { width: 18px; height: 18px; display: block; }
.mt-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-move { max-width: 190px; min-height: 32px !important; padding: 2px 6px !important; font-size: 13px; }
.mt-row .btn-sm { min-height: 30px; padding: 0 8px; }
.mt-row.dragging { opacity: .45; }
.mt-row.drop-before { box-shadow: 0 -3px 0 var(--blue); }
.mt-row.drop-after { box-shadow: 0 3px 0 var(--blue); }
.mt-row.drop-in { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--tint-blue); }
@media (max-width: 760px) { .mt-row { flex-wrap: wrap; margin-left: calc(var(--d, 0) * 16px); } }

/* éditeur visuel des pages */
.pg-editor-v2 { max-width: none; }
.pg-editor-v2 .pg-settings, .pg-editor-v2 .pg-help { max-width: none; }
.pg-settings > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; list-style: none; }
.pg-settings > summary::-webkit-details-marker { display: none; }
.pg-settings > summary svg { width: 18px; height: 18px; }
.pg-canvas { max-width: none; padding: 26px 30px 26px 64px; }
.pg-canvas [contenteditable] { outline: none; }
.pg-canvas [contenteditable]:empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; pointer-events: none; }
.pg-title-edit { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
.pg-canvas-blocks > * + * { margin-top: 10px; }
.pg-eb { position: relative; border-radius: var(--r-sm); padding: 2px 0; }
.pg-eb:hover, .pg-eb:focus-within { box-shadow: 0 0 0 1px var(--line), 0 0 0 6px var(--surface), 0 0 0 7px var(--line-2, var(--line)); }
.pg-eb.dragging { opacity: .4; }
.pg-eb.drop-before::after, .pg-eb.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--blue); }
.pg-eb.drop-before::after { top: -7px; }
.pg-eb.drop-after::after { bottom: -7px; }
/* colonnes (0.54.0) */
.pg-cols { display: flex; gap: 24px; align-items: flex-start; position: relative; }
.pg-col { flex: 1 1 0; min-width: 0; }
.pg-col > .pg-h { margin-top: 0; }
.pg-col > .pg-img img, .pg-col > .pg-video video { max-width: 100%; }
.pg-canvas-blocks > .pg-cols { gap: 46px; }
.pg-canvas-blocks .pg-cols > .pg-eb { flex: 1 1 0; min-width: 0; }
.pg-cols > .pg-eb + .pg-eb .pg-gutter { left: -40px; flex-direction: column; }
.pg-cols.drop-before::after, .pg-cols.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--blue); }
.pg-cols.drop-before::after { top: -7px; }
.pg-cols.drop-after::after { bottom: -7px; }
.pg-eb.drop-left::before, .pg-eb.drop-right::before { content: ""; position: absolute; top: -4px; bottom: -4px; width: 4px; border-radius: 2px; background: var(--blue); z-index: 4; }
.pg-eb.drop-left::before { left: -10px; }
.pg-eb.drop-right::before { right: -10px; }
.pg-eb.drop-left, .pg-eb.drop-right { background: var(--tint-blue); }
.pg-cols .pg-tools { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 760px) { .pg-cols { flex-direction: column; gap: 14px; } .pg-col { width: 100%; } }
.pg-gutter { position: absolute; left: -54px; top: 2px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.pg-eb:hover .pg-gutter, .pg-eb:focus-within .pg-gutter { opacity: 1; }
.pg-plus { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; font-size: 16px; padding: 0; }
.pg-plus:hover { color: var(--blue); border-color: var(--blue); }
.pg-handle { width: 22px; height: 24px; display: grid; place-items: center; cursor: grab; color: var(--muted); letter-spacing: -2px; user-select: none; border-radius: 4px; }
.pg-handle:hover { background: var(--surface-2); }
.pg-tools { position: absolute; right: 0; top: -34px; z-index: 3; display: none; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-1, 0 2px 8px rgba(0,0,0,.12)); }
.pg-eb:hover .pg-tools, .pg-eb:focus-within .pg-tools { display: flex; }
.pg-canvas-blocks > .pg-eb:first-child .pg-tools { top: auto; bottom: -34px; }
.pg-tool { border: 0; background: transparent; color: var(--ink); min-width: 28px; height: 26px; padding: 0 7px; border-radius: 5px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.pg-tool:hover { background: var(--surface-2); }
.pg-tool.on { background: var(--tint-blue); color: var(--blue); font-weight: 600; }
.pg-tool-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 3px; }
.pg-rich { min-height: 1.6em; }
.pg-rich p { margin: 0 0 10px; }
.pg-rich p:last-child { margin-bottom: 0; }
.pg-rich ul, .pg-rich ol { margin: 4px 0 10px; padding-left: 22px; }
.pg-rich a { color: var(--blue); }
.pg-callout .pg-rich { flex: 1; min-width: 0; }
.pg-tone-btn { border: 0; background: transparent; padding: 0; cursor: pointer; align-self: flex-start; }
.pg-plain.pg-h { margin: 6px 0 0; }
.pg-canvas-blocks > .pg-eb:first-child .pg-plain.pg-h { margin-top: 0; }
.pg-img figcaption.pg-plain, .pg-video figcaption.pg-plain { min-height: 1.3em; }
.pg-file-edit .pg-file-name { min-width: 80px; }
.pg-table-edit td, .pg-table-edit th { min-width: 80px; outline: none; }
.pg-table-edit td:focus, .pg-table-edit th:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.pg-btn-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pg-btn-edit .btn span { min-width: 60px; display: inline-block; }
.pg-url { flex: 1 1 260px; min-width: 0; font-size: 13.5px; }
.pg-dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 22px 12px; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; }
.pg-dropzone:hover { border-color: var(--blue); color: var(--blue); }
.pg-dz-ico { font-size: 26px; }
.pg-type-ico { display: inline-block; width: 22px; text-align: center; margin-right: 6px; color: var(--muted); }
.pg-addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.pg-help { margin-top: 10px; max-width: 860px; }
.pg-selbar { position: fixed; z-index: 900; display: flex; gap: 2px; padding: 4px; background: var(--chrome); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pg-selbar[hidden] { display: none; }
.pg-selbar button { border: 0; background: transparent; color: #fff; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 5px; cursor: pointer; font-size: 13.5px; }
.pg-selbar button:hover { background: var(--chrome-2); }
@media (max-width: 860px) {
  .pg-canvas { padding: 16px 14px 16px 40px; }
  .pg-gutter { left: -36px; flex-direction: column; opacity: 1; }
  .pg-tools { position: static; display: flex; flex-wrap: wrap; margin-bottom: 6px; box-shadow: none; }
  .pg-canvas-blocks > .pg-eb:first-child .pg-tools { position: static; }
}

/* ------------------------------------------------------------ Pastille du menu Actions et rappel « à traiter » */
.badge.badge-quiet { background: var(--chrome-2); color: #fff; }
.badge.badge-soon { background: #d9822b; color: #fff; }
.act-mine { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--chrome-2); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; }
.act-mine.soon { border-left-color: #d9822b; background: color-mix(in srgb, #d9822b 7%, var(--surface)); }
.act-mine.late { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.act-mine-txt { flex: 1 1 260px; min-width: 0; }
.act-mine-link { border: 0; background: transparent; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.act-mine-ico { font-size: 18px; }

/* ------------------------------------------------------------ Mobile : discussion et fiche action (0.45.0) */
.msgs, .thread-msgs { overflow-x: hidden; }
.msg-tools { flex-wrap: wrap; }
.msg-more { display: none; margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 6px; cursor: pointer; }
.touch-only { display: none !important; }
.due-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.due-chips button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2, var(--ink)); border-radius: 12px; padding: 2px 9px; font-size: 12.5px; cursor: pointer; }
.due-chips button:hover { border-color: var(--blue); color: var(--blue); }
/* menu d'un message (toucher) */
.sheet-ov { position: fixed; inset: 0; z-index: 950; background: rgba(42,54,81,.42); display: flex; align-items: flex-end; justify-content: center; animation: sheet-fade .15s ease-out; }
.sheet { width: min(520px, 100%); max-height: 85dvh; overflow: auto; background: var(--surface); border-radius: 16px 16px 0 0; padding: 6px 10px calc(10px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(42,54,81,.25); animation: sheet-up .18s ease-out; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
.sheet-quote { font-size: 13.5px; color: var(--muted); margin: 0 6px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sheet-reacts { display: flex; justify-content: space-between; gap: 4px; padding: 0 2px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.sheet-react { flex: 1; height: 48px; border: 0; border-radius: 24px; background: var(--surface-2); font-size: 24px; cursor: pointer; }
.sheet-react.on { background: var(--tint-blue); box-shadow: inset 0 0 0 2px var(--blue); }
.sheet-react.more { font-size: 22px; color: var(--muted); }
.sheet-allreacts { display: none; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.sheet.all .sheet-allreacts { display: grid; }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; border: 0; background: transparent; text-align: left; font-size: 16px; color: var(--ink); padding: 0 12px; border-radius: 10px; cursor: pointer; }
.sheet-item:active { background: var(--surface-2); }
.sheet-item .si { width: 24px; text-align: center; font-size: 19px; }
.sheet-item.danger { color: var(--danger); }
.sheet-item.cancel { justify-content: center; margin-top: 6px; background: var(--surface-2); font-weight: 600; }
.msg.picked { background: var(--tint-blue); border-radius: 8px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
@keyframes sheet-fade { from { opacity: 0; } }

@media (hover: none) {
  .msg-tools, .msg > div > .msg-tools { display: none !important; }
  .msg-more { display: inline-block; }
  .touch-only { display: inline-flex !important; }
  .mention-btn { display: none; }
  .msg { -webkit-tap-highlight-color: transparent; }
}
@media (max-width: 860px) {
  .chat { height: calc(100dvh - 62px - var(--safe-b)); }
  .modal { max-height: calc(100dvh - 16px); }
  .compose-row textarea { font-size: 16px; max-height: 30dvh; }
  .composer, .thread-compose { padding: 6px 8px calc(6px + var(--safe-b)); }
  .convo-head { padding: 8px 10px; gap: 6px; }
  .convo-head h2 { font-size: 19px; min-width: 0; flex: 1 1 auto; }
  .convo-head h2 + span { display: none; }
  .convo-head .lbl { display: none; }
  .convo-head .btn { flex: none; padding: 0 9px; gap: 4px; }
  .msg { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .msg:hover { background: transparent; }
  .msg-time { font-size: 10px; }
  .msg .avatar { width: 30px; height: 30px; font-size: 13px; }
  .att-img img { max-width: min(200px, 60vw); max-height: 180px; }
  /* clavier ouvert : la barre d'onglets s'efface, la zone de saisie reste au-dessus du clavier */
  body.kb-open .tabbar { display: none; }
  body.kb-open .shell { padding-bottom: 0; }
  body.kb-open .chat { height: 100dvh; }
  body.kb-open .chat-drawer { bottom: 0; }
  /* fiches action et intervention : plein écran, boutons toujours visibles en bas */
  .overlay:has(> .fs-modal) { padding: 0; }
  .modal.fs-modal { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: none; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; }
  .fs-modal .modal-head { border-bottom: 1px solid var(--line-2); padding: 10px 12px 8px; flex: none; }
  .fs-modal .modal-head h2 { font-size: 20px; }
  .fs-modal .modal-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 16px; }
  .fs-modal .modal-foot { flex: none; padding: 8px 12px calc(8px + var(--safe-b)); gap: 6px; background: var(--surface); }
  .fs-modal .modal-foot .btn-primary { flex: 1 1 140px; }
  .fs-modal .task-layout { grid-template-columns: minmax(0, 1fr); }
  .fs-modal .form-grid.compact label, .fs-modal .form-grid.compact .field-label { font-size: 13.5px; }
  .fs-modal input:not([type=checkbox]):not([type=radio]):not([type=color]), .fs-modal select, .fs-modal textarea { min-height: 44px; font-size: 16px; }
  .fs-modal textarea { min-height: 80px; }
  .fs-modal .btn { min-height: 42px; }
  .fs-modal.is-new .thread { display: none; }
  .act-modal .form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .act-modal textarea { min-height: 96px; }
  .act-modal .prio-seg { display: flex; width: 100%; }
  .act-modal .prio-seg button { flex: 1; min-height: 40px; padding: 0 4px; }
  /* fiche intervention */
  .task-modal .form-grid.compact { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .task-modal .form-top { gap: 8px; }
  .task-modal .form-top .seg { flex: 1 1 auto; display: flex; }
  .task-modal .form-top .seg button { flex: 1; min-height: 40px; }
  .task-modal .form-top label { margin-left: 0; flex: 1 1 140px; font-size: 13.5px; }
  .task-modal .form-top label select { flex: 1; min-width: 0; width: auto; }
  .task-modal .inline-fields > * { min-width: 0; }
  .task-modal .form-grid.compact .inline-fields input[type=time] { flex: 0 0 104px; }
  .task-modal .res-pick { max-height: 42dvh; }
  .task-modal .res-pick-list { grid-template-columns: minmax(0, 1fr); }
  .task-modal .res-pick label.check { min-height: 36px; font-size: 15px; }
  .task-modal .res-pick label.check.sub { min-height: 32px; font-size: 14.5px; }
  .task-modal .res-pick-members { gap: 0 14px; padding-left: 18px; }
  .task-modal .res-pick-tools .res-pick-search { flex: 1 1 100%; }
  .task-modal .field-label .opt, .task-modal label .opt { display: block; font-size: 12px; }
  .task-modal .rec-box { padding: 8px 10px; }
  .task-modal .rec-sel select { min-height: 44px; }
  .act-modal .due-chips button { padding: 5px 10px; font-size: 13.5px; }
  .act-modal .btn-add-files { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.fd-import-status { font-weight: 700; margin: 4px 0 6px; }
.fd-import-list { max-height: 240px; overflow-y: auto; margin: 0; padding-left: 18px; }
/* Administration › Sécurité (0.61.0) */
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sec-grid > .card { max-width: none; margin: 0; }
.sec-wide { grid-column: 1 / -1; }
.sec-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.sec-grid textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.side-me[aria-current=page] { background: var(--chrome-2); }
@media (max-width: 960px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } }
/* Mon compte réorganisé (0.62.0) */
.acc2 { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1180px; }
.acc-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.acc-me { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.acc-me-photo { position: relative; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.acc-me-photo .acc-photo-edit { width: 26px; height: 26px; font-size: 12px; border-width: 2px; }
.fd-avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.acc-me-t { display: flex; flex-direction: column; min-width: 0; }
.acc-me-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.acc-nav-btn { display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.acc-nav-btn:hover { background: var(--surface-2); }
.acc-nav-btn[aria-current=page] { background: var(--tint-blue); }
.acc-nav-btn[aria-current=page] strong { color: var(--blue); }
.acc-nav-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.acc-nav-btn[aria-current=page] .acc-nav-ico { background: var(--brand-orange); color: #fff; }
.acc-nav-ico svg { width: 18px; height: 18px; }
.acc-nav-t { display: flex; flex-direction: column; min-width: 0; }
.acc-nav-t span { font-size: 12px; color: var(--muted); }
.acc-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acc-panel > .card, .acc-panel > .install-guide { max-width: none; width: 100%; margin: 0; }
.acc-card .acc-card-h { margin-bottom: 14px; }
.acc-photo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.acc-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; }
.acc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-info strong { overflow-wrap: anywhere; }
.acc-bday2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.acc-bday2 input[type=date] { max-width: 200px; }
.acc-matrix { width: 100%; border-collapse: collapse; }
.acc-matrix th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.acc-matrix th:not(:first-child), .acc-sw-cell { text-align: center; width: 140px; }
.acc-matrix td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.acc-matrix .acc-group td { padding: 14px 10px 6px; font-weight: 800; font-family: var(--f-head); border-bottom: 0; color: var(--ink); }
.acc-switch { position: relative; display: inline-flex; width: 44px; height: 26px; cursor: pointer; vertical-align: middle; }
.acc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.acc-switch-ui { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .15s; }
.acc-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.acc-switch input:checked + .acc-switch-ui { background: var(--brand-orange); }
.acc-switch input:checked + .acc-switch-ui::after { transform: translateX(18px); }
.acc-switch input:focus-visible + .acc-switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }
.acc-switch.off { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) {
  .acc2 { grid-template-columns: minmax(0, 1fr); }
  .acc-side { position: static; }
  .acc-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .acc-nav-btn { flex: none; padding: 8px 10px; }
  .acc-nav-t span { display: none; }
  .acc-nav-ico { width: 28px; height: 28px; }
  .acc-matrix th:not(:first-child), .acc-sw-cell { width: 76px; }
  .acc-matrix td { padding: 10px 6px; }
}
.fd-com-input, .fd-c-body-wrap { position: relative; }
.fd-c-body-wrap .mention-list { bottom: auto; top: 100%; }
.fd-text .mention, .fd-com-text .mention { padding: 0 4px; }
.mention.me { color: #fff; }
/* Document Google intégré (0.63.0) */
.pg-embed { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.pg-embed iframe { display: block; width: 100%; border: 0; background: #fff; }
.pg-embed-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.pg-embed-bar .spacer { flex: 1; }
.pg-embed-bar a { font-weight: 700; color: var(--blue); text-decoration: none; }
.pg-embed-kind { font-weight: 700; color: var(--ink-2); }
.pg-embed-edit { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .pg-embed iframe { max-height: 70vh; } }

/* ---- Assistant (IA) : discussions, accès aux boîtes, ma boîte, administration */
.ai-page { max-width: 1500px; }
.ai-chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; height: calc(100vh - 150px); min-height: 520px; }
/* discussions : la zone occupe toute la hauteur restante de l'écran (main-fill), sans vide en bas */
@media (min-width: 901px) {
  .main.main-fill > .ai-page.ai-fill { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
  .main.main-fill > .ai-page.ai-fill > .notice { margin: 0; }
  .main.main-fill > .ai-page.ai-fill > .ai-chat { flex: 1 1 auto; height: auto; min-height: 420px; }
}
@media (max-width: 900px) { .main.main-fill:has(> .ai-page) { height: auto; } }
/* choix de fichiers Google Drive */
.ai-drv { display: flex; flex-direction: column; gap: 10px; min-width: min(720px, 86vw); }
.ai-drv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-drv-q { flex: 1 1 220px; }
.ai-drv-path { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; color: var(--muted); }
.ai-drv-path .linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.ai-drv-path .linklike:hover { text-decoration: underline; }
.ai-drv-list { height: min(420px, 55vh); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; }
.ai-drv-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto 22px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; width: 100%; }
.ai-drv-row.folder .ai-drv-n { font-weight: 700; }
.ai-drv-row.folder .ai-drv-go { font-size: 18px; font-weight: 700; }
.ai-drv-path { min-height: 28px; }
.ai-drv-here { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue); cursor: pointer; white-space: nowrap; }
.ai-drv-picked { display: flex; flex-wrap: wrap; gap: 6px; max-height: 92px; overflow-y: auto; }
.ai-drv-picked[hidden] { display: none; }
.ai-file.ai-dir { border-style: dashed; }
/* administration de l'Assistant : rubriques, chiffres clés en grand */
.ai-adm2 { padding: 0; }
.ai-adm2 .acc-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-adm2 .acc-panel > .card { margin: 0; max-width: none; }
.ai-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ai-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; font: inherit; color: var(--ink); min-width: 0; }
.ai-kpi.link { cursor: pointer; }
.ai-kpi.link:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(42, 54, 81, .08); }
.ai-kpi-l { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ai-kpi-v { font-family: var(--f-head); font-size: 26px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.ai-kpi-s { font-size: 13px; color: var(--muted); }
.ai-kpi.good .ai-kpi-v { color: var(--ink-green, #1e7f4f); }
.ai-kpi.warn .ai-kpi-v { color: var(--ink-orange); }
.ai-kpi.bad .ai-kpi-v { color: var(--ink-red); }
.ai-budget-big { display: flex; flex-direction: column; gap: 10px; }
.ai-budget-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.ai-budget-v { font-family: var(--f-head); font-size: 40px; font-weight: 800; line-height: 1; color: var(--ink); }
.ai-budget-of { font-size: 15px; color: var(--muted); }
.ai-budget-pct { font-family: var(--f-head); font-size: 24px; font-weight: 800; color: var(--blue); }
.ai-budget-pct.warn { color: var(--ink-orange); }
.ai-budget-pct.bad { color: var(--ink-red); }
.ai-budget-big .ai-budget { height: 14px; margin: 0; }
.ai-share-cell { min-width: 120px; }
.ai-share-cell .hbar-track { height: 8px; }
.ai-adm-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 2; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 -4px 14px rgba(42, 54, 81, .06); }
.ai-opts .check { align-items: flex-start; }
@media (max-width: 640px) { .ai-budget-v { font-size: 32px; } .ai-kpi-v { font-size: 22px; } }
/* dossiers de discussions */
.ai-folders-h { display: flex; align-items: center; gap: 6px; }
.ai-folder-add { border: 0; background: none; color: var(--blue); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; padding: 0 2px; text-transform: none; letter-spacing: 0; }
.ai-folder-add:hover { text-decoration: underline; }
.ai-folder { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 34px 7px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ai-folder:hover { background: var(--surface-2); }
.ai-folder.has-on:not(.open) { background: var(--tint-blue); }
.ai-folder-c { width: 12px; color: var(--muted); font-size: 11px; }
.ai-folder-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-folder:hover .ai-conv-more, .ai-folder .ai-conv-more:focus { opacity: 1; }
.ai-folder.drop, .ai-folders-h.drop { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--tint-blue); }
.ai-conv.in-folder { margin-left: 14px; border-left: 2px solid var(--line); border-radius: 0 8px 8px 0; }
.ai-folder-empty { padding: 2px 10px 6px 34px; }
.ai-folder-pop { min-width: 220px; max-height: 360px; overflow-y: auto; }
.ai-conv[draggable=true] { cursor: pointer; }
/* journal des accès aux boîtes */
.ai-log .ai-log-q { font-size: 13.5px; min-width: 220px; overflow-wrap: anywhere; }
.ai-log details summary { cursor: pointer; white-space: nowrap; }
.ai-log-l { margin: 4px 0 0; padding-left: 16px; }
.ai-log-l li { margin: 2px 0; overflow-wrap: anywhere; }
/* demande d'accès ouverte depuis l'e-mail */
.ai-grant-card { min-width: min(460px, 86vw); }
.ai-grant-l { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ai-grant-l strong { overflow-wrap: anywhere; font-weight: 600; }
tr.ai-grant-focus > td { background: var(--tint-blue); }
.ai-drv-row:hover { background: var(--surface-2); }
.ai-drv-row.on { background: var(--tint-blue); }
.ai-drv-row.off { opacity: .5; cursor: default; }
.ai-drv-row .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ai-drv-i { font-size: 16px; }
.ai-drv-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.ai-drv-go { color: var(--blue); text-decoration: none; text-align: center; }
.ai-drv-msg { padding: 14px; text-align: center; }
.ai-drv-more { align-self: center; margin: 6px 0; }
@media (max-width: 640px) { .ai-drv-row .muted { display: none; } .ai-drv-row { grid-template-columns: auto auto minmax(0, 1fr) 22px; } .ai-grant-l { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.ai-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; }
.ai-new { justify-content: center; }
.ai-conv-q { width: 100%; }
.ai-convs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.ai-conv { position: relative; padding: 8px 34px 8px 10px; border-radius: 8px; cursor: pointer; }
.ai-conv:hover { background: var(--surface-2); }
.ai-conv.on { background: var(--tint-blue); }
.ai-conv.on .ai-conv-t { color: var(--blue); }
.ai-conv-t { font-weight: 700; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-conv-m { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-conv-more { position: absolute; top: 6px; right: 4px; opacity: 0; }
.ai-conv:hover .ai-conv-more, .ai-conv.on .ai-conv-more, .ai-conv-more:focus { opacity: 1; }
.ai-conv-empty { padding: 10px; }
.ai-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); min-height: 46px; }
.ai-back { display: none; flex: 0 0 auto; }
.ai-title strong { font-family: var(--f-head); font-size: 15px; }
.ai-thread { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 16px; }
.ai-msg { display: flex; gap: 10px; max-width: 920px; width: 100%; }
.ai-msg.user { align-self: flex-end; justify-content: flex-end; }
.ai-msg.user .ai-bubble { background: var(--blue-fill); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: 75%; white-space: normal; overflow-wrap: anywhere; }
.ai-msg.bot .ai-bubble { flex: 1; min-width: 0; padding: 2px 0; }
.ai-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue); }
.ai-av svg { width: 17px; height: 17px; }
.ai-md { line-height: 1.6; overflow-wrap: anywhere; }
.ai-md p { margin: 0 0 10px; }
.ai-md ul, .ai-md ol { margin: 4px 0 10px; padding-left: 22px; }
.ai-md li { margin: 2px 0; }
.ai-md .ai-h { font-family: var(--f-head); margin: 14px 0 6px; font-size: 16px; }
.ai-md h4.ai-h { font-size: 14.5px; }
.ai-md a { color: var(--blue); }
.ai-md code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.ai-code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; }
.ai-code code { background: none; border: 0; padding: 0; }
.ai-quote { margin: 6px 0 12px; padding: 4px 0 4px 14px; border-left: 3px solid var(--blue); color: var(--ink-2); }
.ai-quote p:last-child { margin-bottom: 0; }
.ai-md .table-wrap { margin: 6px 0 12px; }
.ai-table th, .ai-table td { font-size: 13px; vertical-align: top; }
.ai-steps { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.ai-steps summary { cursor: pointer; font-weight: 700; }
.ai-steps ol { margin: 6px 0 0; padding-left: 20px; }
.ai-steps li { margin: 2px 0; overflow-wrap: anywhere; }
.ai-step-i { display: inline-block; width: 18px; }
.ai-typing { display: flex; align-items: center; gap: 4px; padding: 6px 0; }
.ai-typing > span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); opacity: .3; animation: ai-dot 1.2s infinite ease-in-out; }
.ai-typing > span:nth-child(2) { animation-delay: .2s; }
.ai-typing > span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-typing > span { animation: none; opacity: .6; } }
/* sources : repliées sous la réponse (résumé par type), dépliées au clic */
.ai-sources { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.ai-sources-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 4px 0; cursor: pointer; list-style: none; font-size: 12px; color: var(--muted); user-select: none; }
.ai-sources-h::-webkit-details-marker { display: none; }
.ai-sources-h::before { content: '▸'; font-size: 11px; color: var(--blue); transition: transform .15s; }
.ai-sources[open] > .ai-sources-h::before { transform: rotate(90deg); }
.ai-sources-t { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.ai-sources-c { min-width: 0; }
.ai-sources-more, .ai-sources-less { margin-left: auto; color: var(--blue); font-weight: 700; }
.ai-sources-h:hover .ai-sources-more, .ai-sources-h:hover .ai-sources-less { text-decoration: underline; }
.ai-sources[open] .ai-sources-more, .ai-sources:not([open]) .ai-sources-less { display: none; }
.ai-sources-l { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ai-src { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
a.ai-src:hover { border-color: var(--blue); background: var(--surface-2); }
.ai-src-s { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-src .muted { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-src-go { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--blue); }
.ai-src-f { grid-column: 1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.ai-empty { margin: auto; max-width: 620px; text-align: center; padding: 20px; }
.ai-empty-ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--tint-blue); color: var(--blue); }
.ai-empty-ico svg { width: 28px; height: 28px; }
.ai-empty h2 { margin: 12px 0 6px; }
.ai-sugg { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ai-sugg-b { text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ai-sugg-b:hover { border-color: var(--blue); background: var(--surface-2); }
.ai-composer { border-top: 1px solid var(--line); padding: 10px 14px 8px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.ai-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ai-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chip:hover { border-color: var(--blue); }
.ai-chip.on { background: var(--tint-blue); border-color: var(--blue); color: var(--blue); font-weight: 700; }
.ai-chip.warn { border-style: dashed; color: var(--ink-orange); }
.ai-sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.ai-model { width: auto; font-size: 12.5px; padding: 4px 8px; }
.ai-row { display: flex; gap: 8px; align-items: flex-end; }
.ai-input { flex: 1; resize: none; min-height: 42px; max-height: 220px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; }
.ai-send { min-width: 104px; height: 42px; }
.ai-hint { margin: 0; text-align: center; }
.ai-pick { width: min(420px, 92vw); padding: 8px; }
.ai-pick-q { width: 100%; margin-bottom: 6px; }
.ai-pick-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.ai-pick-list .pop-item { text-align: left; white-space: normal; }
.pop-item.on { background: var(--tint-blue); }
.ai-card { max-width: none; margin-bottom: 16px; }
.ai-privacy { margin: 14px 0 0; padding-left: 18px; }
.ai-privacy li { margin: 4px 0; }
.ai-models { display: flex; flex-direction: column; gap: 6px; }
.ai-model-row { align-items: flex-start; }
.ai-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 10px; }
.ai-budget { margin: 6px 0 4px; height: 8px; }
.ai-proj-btn { justify-content: flex-start; width: 100%; }
.ai-admin .ai-row input { flex: 1; }
.ai-mboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 18px; margin-top: 10px; max-height: 460px; overflow-y: auto; }
.ai-mws-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 4px; }
.ai-mboard { display: flex; align-items: flex-start; padding: 3px 0; }
.ai-src.monday .ai-src-s { color: var(--ink); }
.ai-mcache { margin: 0 0 10px; gap: 10px; }
.ai-mmode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--primary, #E75200); border-radius: var(--r-md); }
.ai-mmode-l { flex: 1 1 260px; min-width: 0; }
.ai-mmode-b { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-mb-list { max-height: 58vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.ai-mb-list table.list td:first-child { width: 100%; }
.ai-mcp { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface-2); }
.ai-mcp-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 8px; }
.ai-mcp-tools code { font-size: 12.5px; }
/* pièces jointes */
.ai-main.drop { outline: 2px dashed var(--blue); outline-offset: -6px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-files.sent { justify-content: flex-end; margin-bottom: 6px; }
.ai-file { display: inline-flex; align-items: center; gap: 6px; max-width: 280px; padding: 5px 8px 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 13px; }
a.ai-file:hover { border-color: var(--blue); }
.ai-file.up { opacity: .7; }
.ai-file-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 600; }
.ai-file-x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ai-file-x:hover { color: var(--ink-red); }
.ai-attach { height: 42px; width: 42px; flex: none; }
.ai-user-col { display: flex; flex-direction: column; align-items: flex-end; max-width: 75%; min-width: 0; }
.ai-user-col .ai-bubble { max-width: 100% !important; }
/* favoris, partage, commentaires */
.ai-conv { padding-right: 58px; }
.ai-conv-g { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 2px; }
.ai-conv-g:first-child { padding-top: 2px; }
.ai-conv-fav { position: absolute; top: 7px; right: 34px; border: 0; background: none; font-size: 16px; line-height: 1; padding: 4px 2px; cursor: pointer; color: var(--muted); opacity: 0; }
.ai-conv:hover .ai-conv-fav, .ai-conv-fav:focus, .ai-conv.fav .ai-conv-fav { opacity: 1; }
.ai-conv.fav .ai-conv-fav, .ai-conv-fav:hover { color: var(--ink-orange); }
.ai-unread { margin-left: 6px; }
.ai-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; justify-content: flex-end; }
.ai-head .ai-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-fav-btn.on { color: var(--ink-orange); font-weight: 700; }
.ai-shared-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.ai-ro { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 12px 16px; background: var(--surface-2); font-size: 13.5px; }
.ai-msg.flash .ai-bubble { animation: ai-flash 1.6s ease-out; border-radius: 8px; }
@keyframes ai-flash { 0%, 40% { background: var(--tint-blue); } 100% { background: transparent; } }
.ai-chat.notes-open { grid-template-columns: 280px minmax(0, 1fr) 320px; }
.ai-notes { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ai-notes[hidden] { display: none; }
.ai-notes-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); min-height: 46px; }
.ai-note-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-note { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ai-note.me { background: var(--tint-blue); border-color: transparent; }
.ai-note-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.ai-note-b { margin-top: 4px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-note-on { display: block; border: 0; background: none; padding: 0; margin-top: 2px; font: inherit; font-size: 12px; color: var(--blue); cursor: pointer; text-align: left; }
.ai-note-on:hover { text-decoration: underline; }
.ai-note-x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ai-note-x:hover { color: var(--ink-red); }
.ai-note-form { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ai-note-ref { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--blue); }
.ai-note-ref[hidden] { display: none; }
.ai-note-in { resize: vertical; min-height: 54px; max-height: 200px; }
.ai-note-row { display: flex; align-items: center; gap: 8px; }
.ai-note-empty { margin: 0; }
.ai-share { display: flex; flex-direction: column; gap: 10px; min-width: min(460px, 86vw); }
.ai-share p { margin: 0; }
.ai-share-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.ai-share-u { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ai-share-u:hover { background: var(--surface-2); }
.ai-share-u .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1250px) {
  .ai-chat.notes-open { grid-template-columns: 240px minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .ai-chat.notes-open { grid-template-columns: minmax(0, 1fr); }
  .ai-notes { max-height: 70vh; }
  .ai-head { flex-wrap: wrap; }
  .ai-chat { grid-template-columns: minmax(0, 1fr); height: auto; }
  /* téléphone (0.87.0) : liste des discussions OU discussion en plein écran (.m-conv), bouton ‹ pour revenir */
  .ai-chat:not(.m-conv) > .ai-main, .ai-chat:not(.m-conv) > .ai-notes { display: none; }
  .ai-chat.m-conv > .ai-side { display: none; }
  .ai-side { max-height: none; border: 0; padding: 0; background: transparent; }
  .ai-side .ai-convs { overflow: visible; }
  .main:has(.ai-chat.m-conv) > .page-head { display: none; }
  .ai-page.ai-fill:has(.ai-chat.m-conv) { padding: 0; }
  .ai-chat.m-conv { gap: 0; }
  .ai-chat.m-conv > .ai-main { height: calc(100dvh - 62px - var(--safe-b, 0px)); min-height: 0; border-radius: 0; border-left: 0; border-right: 0; }
  body.kb-open .ai-chat.m-conv > .ai-main { height: 100dvh; }
  .ai-head { flex-wrap: nowrap; padding: 6px 8px; gap: 6px; position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .ai-head .ai-title { flex: 1 1 auto; font-size: 15px; }
  .ai-head > .spacer { display: none; }
  .ai-head-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 55%; }
  .ai-head-tools::-webkit-scrollbar { display: none; }
  .ai-back { display: inline-flex; }
  /* onglets de l'Assistant : une ligne qui défile au doigt (« Accès aux boîtes » passait sur 3 lignes) */
  .ai-page ~ .page-head .seg, .page-head:has(+ .ai-page) .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .page-head:has(+ .ai-page) .seg button { white-space: nowrap; flex: 0 0 auto; padding: 8px 14px; }
  .page-head:has(+ .ai-page) { flex-wrap: wrap; gap: 8px; }
  .page-head:has(+ .ai-page) h1 { font-size: 26px; }
  .ai-thread { padding: 12px 10px 6px; }
  .ai-msg.user .ai-bubble { max-width: 88%; }
  .ai-two { grid-template-columns: minmax(0, 1fr); }
  .ai-send { min-width: 0; }
}

/* ---- Docs : fil d'Ariane et sommaire des sous-pages (d'après l'organisation du menu) */
.pg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); margin: -4px 0 16px; }
.pg-crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.pg-crumbs a:hover { color: var(--blue); text-decoration: underline; }
.pg-crumb-sep { opacity: .6; }
.pg-crumb-cur { color: var(--ink); font-weight: 700; }
.pg-subpages { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 0 22px; }
.pg-sub { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .12s, background .12s; }
.pg-sub:hover { border-color: var(--blue); background: var(--surface-2); }
.pg-sub-ico { width: 36px; height: 36px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue); }
.pg-sub-ico svg { width: 18px; height: 18px; }
.pg-sub-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pg-sub-t strong { overflow-wrap: anywhere; line-height: 1.3; }
.pg-sub-go { color: var(--muted); font-size: 20px; }
.pg-sub-edit { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.pg-sub-edit .pg-subpages { margin: 0; pointer-events: none; }
.mt-compact { font-size: 12.5px; white-space: nowrap; }

/* ---- Administration : rubriques groupées à gauche (comme Mon compte), vue d'ensemble */
.adm2 { max-width: 1400px; }
/* menu de l'administration compact (1.42.0) : une ligne par écran, rubriques repliables, recherche */
.adm-nav { gap: 0; }
.adm-nav-q { margin: 2px 2px 6px; padding: 7px 10px; font-size: 13px; }
.adm-nav-group { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 10px 4px; text-align: left; }
.adm-nav-group:hover { color: var(--ink); }
.adm-nav-group > span:first-child { flex: 1; }
.adm-nav-n { font-weight: 700; letter-spacing: 0; opacity: .8; }
.adm-nav-chev { transition: transform .15s; }
.adm-nav-group[aria-expanded=false] .adm-nav-chev { transform: rotate(-90deg); }
.adm-nav-items { display: flex; flex-direction: column; gap: 1px; }
.adm-nav-items[hidden] { display: none; }
.adm-nav-btn { padding: 6px 8px; gap: 10px; }
.adm-nav-btn[hidden] { display: none; }
.adm-nav-btn .acc-nav-ico { width: 26px; height: 26px; border-radius: 7px; }
.adm-nav-btn .acc-nav-ico svg { width: 15px; height: 15px; }
.adm-nav-btn strong { font-size: 13.5px; font-weight: 600; }
.adm-nav-btn[aria-current=page] strong { font-weight: 800; }
.adm2 .acc-side { max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; }
/* sommaire d'un écran long */
.adm-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.adm-toc.sticky { position: sticky; top: 0; z-index: 3; box-shadow: 0 4px 10px -8px rgba(0,0,0,.35); }
.adm-toc-l { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: 4px; }
.adm-toc-b { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.adm-toc-b:hover { border-color: var(--blue); color: var(--blue); }
.adm2 .acc-panel section.card { scroll-margin-top: 64px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.adm-tile { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.adm-tile:hover { border-color: var(--blue); background: var(--surface-2); }
.adm-tile-h { display: flex; align-items: center; gap: 10px; }
.adm-tile-h strong { flex: 1; min-width: 0; }
.adm-tile-h .pill { flex: none; }
.adm-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4px 12px; margin-top: 8px; }
.adm-link { text-decoration: none; }
.adm-app { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.adm2 .acc-panel > .admin-grid, .adm2 .acc-panel > .sec-grid { width: 100%; }
@media (max-width: 900px) {
  .adm-nav-group, .adm-nav-q { display: none; }
  .adm-nav-sec, .adm-nav-items, .adm-nav-items[hidden] { display: contents; }
  .adm2 .acc-side { max-height: none; overflow: visible; }
  .adm-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .adm-toc-b { flex: none; }
}
/* suivi des utilisateurs (1.42.0) */
.usg .card-head select { width: auto; flex: none; }
.usg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.usg-kpis.two { grid-template-columns: 1fr 1fr; }
.usg-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.usg-kpi strong { font: 800 24px/1.1 var(--f-head); color: var(--ink); }
.usg-kpi span { font-size: 12.5px; color: var(--ink-2); }
.usg-kpi small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.usg-kpi.hi { background: var(--tint-green); border-color: transparent; }
.usg-kpi.hi strong { color: var(--ok); }
.usg-kpi.warn strong { color: var(--blue); }
.usg-online { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.usg-on-row { display: grid; grid-template-columns: auto minmax(160px, 1.4fr) minmax(0, 1.3fr) auto auto; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--surface-2); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.usg-on-row:hover { background: var(--tint-blue); }
.usg-on-t { display: flex; flex-direction: column; min-width: 0; }
.usg-on-t > *, .usg-on-m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usg-ava { position: relative; display: inline-flex; flex: none; }
.usg-ava .fd-avatar { width: 32px; height: 32px; font-size: 12px; }
.usg-ava.on::after, .usg-ava.idle::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); }
.usg-ava.idle::after { background: var(--muted); }
.usg-chart { position: relative; margin-top: 12px; }
.usg-bars { display: flex; align-items: stretch; gap: 2px; height: 170px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.usg-bar-c { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; outline: none; border-radius: 4px 4px 0 0; }
.usg-bar-c:hover, .usg-bar-c:focus-visible { background: var(--surface-2); }
.usg-bar { display: block; width: 100%; max-width: 28px; margin: 0 auto; background: var(--blue); border-radius: 4px 4px 0 0; }
.usg-bar-c.we .usg-bar { opacity: .45; }
.usg-bar-x { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.usg-tip { position: absolute; width: 170px; display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 8px; background: var(--ink); color: var(--surface); font-size: 12px; pointer-events: none; z-index: 2; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.usg-tip[hidden] { display: none; }
.usg-heat { display: grid; grid-template-columns: 34px repeat(17, minmax(0, 1fr)); gap: 2px; margin-top: 10px; }
.usg-heat-x { font-size: 10px; color: var(--muted); text-align: left; white-space: nowrap; }
.usg-heat-y { font-size: 11px; color: var(--muted); align-self: center; }
.usg-cell { display: block; aspect-ratio: 1; min-height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--blue) calc(var(--a, 0) * 100%), var(--surface-2)); }
.usg-hbars { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.usg-hbar { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.usg-hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usg-hbar-t { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-2); overflow: hidden; }
.usg-hbar-t > span { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.usg-hbar-v { color: var(--ink-2); white-space: nowrap; }
.usg-meter { height: 10px; margin-top: 12px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.usg-meter > span { display: block; height: 100%; background: var(--blue); }
.usg-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.usg-filters input { flex: 1; min-width: 200px; }
.usg-filters select { width: auto; flex: none; }
.usg-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.usg-row { cursor: pointer; }
.usg-row:hover td { background: var(--surface-2); }
.usg-who { display: flex; align-items: center; gap: 10px; }
.usg-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.usg-user h3 { margin: 18px 0 8px; font-size: 14px; }
.usg-cal { display: flex; gap: 6px; }
.usg-cal-y { display: grid; grid-template-rows: repeat(7, 14px); gap: 3px; font-size: 10px; color: var(--muted); }
.usg-cal-g { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-auto-columns: 14px; gap: 3px; overflow-x: auto; }
.usg-cal-g .usg-cell { min-height: 0; width: 14px; height: 14px; aspect-ratio: auto; }
.usg-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.usg-2col > * { min-width: 0; }
.usg-user table.list td { padding: 7px 10px; }
@media (max-width: 700px) {
  .usg-on-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .usg-on-row > .usg-on-m { display: none; }
  .usg-2col { grid-template-columns: 1fr; }
  .usg-heat-x { font-size: 8px; }
}

/* ---- Editor.js (éditeur de pages) : pleine largeur, thème LOISON.Hub (clair / sombre) */
.pg-ej .codex-editor { color: var(--ink); }
.pg-ej .ce-block__content, .pg-ej .ce-toolbar__content { max-width: none; }
.pg-ej .codex-editor__redactor { padding-bottom: 120px !important; }
.pg-ej .ce-paragraph { line-height: 1.6; }
.pg-ej .ce-paragraph a, .pg-ej .pg-ej-callout-txt a, .pg-ej .tc-cell a { color: var(--blue); text-underline-offset: 2px; }
.pg-ej h2.ce-header, .pg-ej h3.ce-header { font-family: var(--f-head); line-height: 1.25; margin: 14px 0 2px; padding: 4px 0; }
.pg-ej h2.ce-header { font-size: 24px; }
.pg-ej h3.ce-header { font-size: 19px; }
.pg-ej .ce-block--selected .ce-block__content { background: var(--tint-blue); }
.pg-ej .ce-toolbar__plus, .pg-ej .ce-toolbar__settings-btn { color: var(--ink-2); background: var(--surface); }
.pg-ej .ce-toolbar__plus:hover, .pg-ej .ce-toolbar__settings-btn:hover { background: var(--surface-2); }
.pg-ej .ce-popover, .ce-popover {
  --color-background: var(--surface); --color-text-primary: var(--ink); --color-text-secondary: var(--muted); --color-border: var(--line);
  --color-background-item-hover: var(--surface-2); --color-background-item-focus: var(--surface-2); --color-background-icon-active: var(--tint-blue);
  --color-text-icon-active: var(--blue); --color-shadow: rgba(0, 0, 0, .18); --color-background-item-confirm: #c0392b; --color-background-item-confirm-hover: #a93226;
}
.ce-inline-toolbar, .ce-conversion-toolbar { color: var(--ink); }
.pg-ej .tc-wrap { --color-border: var(--line); --color-background: var(--surface-2); --color-text-secondary: var(--muted); --color-border-hover: var(--line); }
.pg-ej .tc-cell { color: var(--ink); }
.pg-ej .cdx-list { color: var(--ink); }
.pg-ej .ce-delimiter { color: var(--muted); }
/* champs propres aux blocs LOISON.Hub */
.pg-ej [contenteditable][data-ph]:empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; pointer-events: none; }
.pg-ej-media { margin: 6px 0; }
.pg-ej-cap { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; outline: none; }
.pg-ej-callout-txt { flex: 1; min-width: 0; outline: none; line-height: 1.6; }
.pg-ej .pg-callout { margin: 6px 0; }
.pg-ej .pg-embed-edit, .pg-ej .pg-btn-edit { margin: 6px 0; }
/* colonnes : repère dans l'éditeur (la mise en page réelle se voit dans « Aperçu » et sur la page publiée) */
.pg-ej-cell.beside, .pg-ej-cell.wide { border-left: 3px solid var(--blue); padding-left: 12px; }
.pg-ej-cell.beside::before, .pg-ej-cell.wide::before { content: attr(data-col); display: block; font-size: 11px; font-weight: 700; color: var(--blue); margin: 4px 0 -2px; }
.pg-preview { padding: 0; box-shadow: none; border: 0; }
@media (max-width: 650px) { .pg-ej .ce-toolbar__actions { background: var(--surface); } }


/* 0.73.0 : questions types, coût estimé, réponse en direct, brouillons, avis, sources Drive / Hub / Internet, suivis */
.ai-preset { height: 42px; width: 42px; flex: none; font-size: 17px; }
.ai-presets { min-width: 280px; }
.ai-presets .pop-item { text-align: left; white-space: normal; }
.ai-hint-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; }
.ai-hint-row .ai-hint { flex: 1 1 320px; }
.ai-cost { white-space: nowrap; }
.warn-text { color: var(--ink-orange); font-weight: 700; }
.ai-live > :last-child::after { content: '▍'; margin-left: 2px; color: var(--blue); animation: ai-blink 1s steps(2) infinite; }
@keyframes ai-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ai-live > :last-child::after { animation: none; } }
.ai-rate { display: inline-flex; gap: 0; }
.ai-rate .btn.on { background: var(--tint-blue); }
.ai-src.hub .ai-src-s, .ai-src.drive .ai-src-s, .ai-src.web .ai-src-s { color: var(--ink); }
.ai-drafts { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ai-draft { border: 1px solid var(--blue); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.ai-draft.done { border-color: var(--line); }
.ai-draft-h { display: flex; align-items: center; gap: 6px; }
.ai-draft-f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; }
.ai-draft-f label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.ai-draft-f label.full { grid-column: 1 / -1; }
.ai-draft textarea { width: 100%; font: inherit; font-size: 13.5px; line-height: 1.45; resize: vertical; }
.ai-draft-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ai-mb-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.ai-mb-opts .check { align-items: flex-start; }
.ai-sched-src { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ai-sched-q { max-width: 520px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 640px) {
  .ai-draft-f { grid-template-columns: minmax(0, 1fr); }
  .ai-foot { flex-wrap: wrap; }
}

/* 0.74.0 : Administration › État du serveur */
.pill.warn { background: var(--tint-orange, #fff3e0); color: var(--ink-orange); }
.health-head h2 { margin: 0; }
.health-head.health-ok { border-left: 4px solid var(--ok); }
.health-head.health-warn { border-left: 4px solid var(--ink-orange); }
.health-head.health-error { border-left: 4px solid var(--ink-red); }
.health-list { display: flex; flex-direction: column; }
.health-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.health-row:first-child { border-top: 0; }
.health-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.health-l .muted { overflow-wrap: anywhere; }
.health-v { display: flex; align-items: center; gap: 8px; flex: none; text-align: right; }
.health-row.error .health-l strong { color: var(--ink-red); }
.health-msg { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .health-row { flex-direction: column; } .health-v { text-align: left; } }

/* ---- Assistant sur téléphone (0.87.1) : saisie compacte, réglages repliés, boutons en icônes, liste façon messagerie */
.ai-opts-sum { display: none; }
@media (max-width: 900px) {
  .ai-composer { padding: 6px 8px calc(6px + var(--safe-b, 0px)); gap: 6px; }
  .ai-opts-sum { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: var(--line-2); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--ink-2); text-align: left; cursor: pointer; }
  .ai-opts-l { font-weight: 600; color: var(--muted); }
  .ai-opts-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ai-opts-c { color: var(--muted); transition: transform .15s; }
  .ai-composer.opts-open .ai-opts-c { transform: rotate(180deg); }
  .ai-composer:not(.opts-open) > .ai-controls, .ai-composer:not(.opts-open) > .ai-hint-row { display: none; }
  .ai-composer .ai-hint { display: none; }
  .ai-controls { max-height: 40vh; overflow-y: auto; }
  .ai-controls .ai-model { flex: 1 1 100%; }
  .ai-row { gap: 4px; align-items: flex-end; }
  .ai-row .btn-icon { width: 38px; height: 42px; flex: 0 0 auto; }
  .ai-input { font-size: 16px; min-height: 42px; border-radius: 21px; padding: 10px 14px; }
  .ai-send { width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center; }
  .ai-send .ai-l { display: none; }
  .ai-send-i { font-size: 18px; line-height: 1; }
  .ai-l { display: none; }
  .ai-head-tools .btn { padding: 6px 8px; min-width: 36px; }
  .ai-head-tools { justify-content: flex-start; max-width: none; flex: 0 0 auto; gap: 0; }
  .ai-head .ai-title { flex: 1 1 0; }
  .ai-shared-chip { display: none; }
  .ai-foot { gap: 2px; }
  .ai-foot .btn { padding: 4px 8px; font-size: 16px; }
  .ai-thread { padding: 10px 8px 6px; }
  .ai-msg .ai-av { display: none; }
  .ai-bubble { max-width: 100%; }
  /* liste : gros bouton remplacé par un bouton flottant, options toujours visibles au toucher */
  .ai-side > .ai-new { position: fixed; right: 16px; bottom: calc(78px + var(--safe-b, 0px)); z-index: 60; width: 56px; height: 56px; padding: 0; border-radius: 50%; font-size: 0; box-shadow: 0 6px 18px rgba(231, 82, 0, .35); display: grid; place-items: center; }
  .ai-side > .ai-new svg { width: 26px; height: 26px; }
  .ai-chat.m-conv .ai-side > .ai-new { display: none; }
  .ai-conv { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; margin: 0 0 6px; padding: 10px 70px 10px 12px; }
  .ai-conv-more, .ai-conv-fav, .ai-folder .ai-conv-more { opacity: 1; }
  .ai-conv-more { top: 8px; }
  .ai-conv-fav { top: 9px; }
  .ai-convs { padding-bottom: 80px; }
}
@media (hover: none) { .ai-conv-more, .ai-conv-fav, .ai-folder .ai-conv-more { opacity: 1; } }
/* ---- Accueil (Hub) sur un seul écran (0.88.1) : bandeau d'accueil conservé, chiffres du jour, zone principale 3 colonnes × 2 rangées
   (À faire | Actualités sur 2 colonnes / Top contributeurs | Ligue 1 | Photos) et colonne latérale étroite (Accès rapides, Anniversaires,
   Nouveaux arrivants en format compact) ; chaque carte défile à l'intérieur si besoin. Petit écran / téléphone : cartes empilées. */
.hub-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.hub-grid > .hub-card, .hub-side { min-width: 0; }
.hub-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) { .hub-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1100px) {
  .hub { height: 100dvh; box-sizing: border-box; max-width: none; gap: 12px; padding-top: 14px; padding-bottom: 14px; overflow: hidden; }
  /* bandeau d'accueil : même présentation qu'avant, un peu moins haut */
  .hub-hero { flex: none; min-height: 0; height: clamp(118px, 17vh, 168px); }
  .hub-hero-txt { padding: 14px 28px; gap: 6px; }
  .hub-hero h1 { font-size: clamp(22px, 2.1vw, 30px); }
  .hub-hero p { font-size: 15px; }
  .hub-art { min-height: 0; }
  .hub-slogan { font-size: 12.5px; line-height: 1.6; }
  /* chiffres du jour */
  .hub-kpis { flex: none; gap: 12px; }
  .hub-kpi { padding: 10px 14px; gap: 12px; align-items: center; }
  .hub-kpi-ico { width: 38px; height: 38px; }
  .hub-kpi-ico svg { width: 21px; height: 21px; }
  .hub-kpi-v { font-size: 24px; }
  .hub-kpi-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* grille */
  .hub-grid { flex: 1 1 0; min-height: 0; gap: 12px; align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) clamp(260px, 19vw, 320px);
    grid-template-rows: minmax(0, .82fr) minmax(0, 1.18fr);
    grid-template-areas: "todo news news side" "top foot photos side"; }
  .hub-grid > .hub-todo { grid-area: todo; } .hub-grid > .hub-newscard { grid-area: news; } .hub-grid > .hub-top { grid-area: top; }
  .hub-grid > .hub-foot { grid-area: foot; } .hub-grid > .hub-photos { grid-area: photos; } .hub-grid > .hub-side { grid-area: side; }
  .hub-grid > .hub-card, .hub-side > .hub-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 12px 14px; gap: 8px; }
  .hub-grid .hub-card-h { margin-bottom: 0; flex: none; }
  .hub-grid .hub-card-h h2 { font-size: 16px; padding-bottom: 6px; }
  .hub-grid .hub-more { font-size: 12.5px; }
  .hub-grid .hub-card > * { flex: none; }
  .hub-grid .hub-card > .hub-list, .hub-grid .hub-card > .hub-tool-grid, .hub-grid .hub-card > .hub-photo-grid,
  .hub-grid .hub-top > .hub-lb-list, .hub-grid .hub-foot > .ft-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .hub-grid .hub-empty { padding: 8px 4px; font-size: 13px; }
  /* colonne latérale : accès rapides, puis anniversaires et arrivants compacts */
  .hub-side { min-height: 0; gap: 12px; }
  .hub-side > .hub-tools { flex: 0 1 auto; }
  .hub-side > .hub-bdays, .hub-side > .hub-arrivals { flex: 0 1 auto; max-height: 34%; }
  .hub-side .hub-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
  .hub-side .hub-tool { gap: 8px; padding: 6px 8px; }
  .hub-side .hub-tool-logo { width: 26px; height: 26px; flex: none; }
  .hub-side .hub-tool-txt { min-width: 0; }
  .hub-side .hub-tool-txt strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hub-side .hub-tool-txt span, .hub-side .hub-tool-go { display: none; }
  .hub-side .hub-empty { padding: 2px 0; font-size: 12.5px; text-align: left; }
  .hub-side .hub-empty .muted { display: none; }
  .hub-side .hub-list { gap: 6px; }
  .hub-side .hub-arrival, .hub-side .hub-bday { padding: 4px 0; gap: 8px; }
  .hub-side .hub-avatar, .hub-side .hub-bday .fd-avatar { width: 30px; height: 30px; font-size: 11px; }
  .hub-side .hub-arrival-t { display: none; }
  .hub-side .hub-arrival-s, .hub-side .hub-bday-s { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hub-side .hub-arrival-d { font-size: 11px; }
  /* actualités : la diapositive remplit la carte */
  .hub-grid .hub-news { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .hub-grid .hub-news-slide { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .hub-grid .hub-news-img { min-height: 0; }
  .hub-grid .hub-news-txt { overflow: hidden; }
  .hub-grid .hub-news-txt p { -webkit-line-clamp: 7; }
  .hub-grid .hub-dots { flex: none; }
  /* photos : légende posée sur la photo */
  .hub-grid .hub-photo-grid { gap: 8px; align-content: start; }
  .hub-grid .hub-photo { position: relative; border-radius: 9px; overflow: hidden; }
  .hub-grid .hub-photo-img { aspect-ratio: 4 / 3; border-radius: 9px; }
  .hub-grid .hub-photo-img::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
  .hub-grid .hub-photo-tag { top: 6px; bottom: auto; font-size: 10px; padding: 1px 6px; }
  .hub-grid .hub-photo-t, .hub-grid .hub-photo-s { position: absolute; left: 7px; right: 7px; color: #fff; z-index: 1; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
  .hub-grid .hub-photo-t { bottom: 18px; font-size: 11.5px; }
  .hub-grid .hub-photo-s { bottom: 4px; font-size: 10.5px; color: rgba(255,255,255,.85); }
  /* Top contributeurs réduit : petit podium, liste défilante */
  .hub-grid .hub-top { gap: 6px; }
  .hub-grid .hub-lb-period, .hub-grid .hub-lb-svc { min-height: 26px !important; font-size: 12px; max-width: 130px; }
  .hub-grid .hub-lb-seg button { min-height: 24px; font-size: 12px; padding: 0 8px; }
  .hub-grid .hub-lb-chip { padding: 3px 7px; font-size: 11px; }
  .hub-grid .hub-lb-podium { padding-top: 0; gap: 6px; }
  .hub-grid .hub-lb-ava .fd-avatar, .hub-grid .hub-lb-ava.ghost { width: 30px; height: 30px; font-size: 11px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-ava .fd-avatar { width: 36px; height: 36px; font-size: 12px; }
  .hub-grid .hub-lb-who { padding-bottom: 3px; }
  .hub-grid .hub-lb-who strong { font-size: 12px; }
  .hub-grid .hub-lb-pts { font-size: 12px; } .hub-grid .hub-lb-step.m1 .hub-lb-pts { font-size: 13px; }
  .hub-grid .hub-lb-medal { font-size: 13px; }
  .hub-grid .hub-lb-step .hub-lb-mv { display: none; }
  .hub-grid .hub-lb-block { font-size: 11px; border-radius: 5px 5px 2px 2px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-block { height: 20px; } .hub-grid .hub-lb-step.pos2 .hub-lb-block { height: 15px; } .hub-grid .hub-lb-step.pos3 .hub-lb-block { height: 11px; }
  .hub-grid .hub-lb-row { padding: 3px 6px 3px 2px; gap: 7px; grid-template-columns: 18px 24px minmax(0, 1fr) auto; }
  .hub-grid .hub-lb-row .fd-avatar, .hub-grid .hub-lb-svcdot { width: 24px; height: 24px; font-size: 10px; }
  .hub-grid .hub-lb-me { padding: 5px 9px; font-size: 12px; }
  .hub-grid .hub-lb-note { display: none; }
  /* Ligue 1 réduite */
  .hub-grid .hub-foot { gap: 6px; }
  .hub-grid .hub-foot .ft-tabs button { min-height: 24px; font-size: 12px; padding: 0 8px; }
  .hub-grid .ft-scroll { max-height: none; }
  .hub-grid .ft-match { grid-template-columns: 74px minmax(0, 1fr) auto minmax(0, 1fr) 40px; padding: 3px 2px; font-size: 12px; gap: 4px; }
  .hub-grid .ft-in { width: 30px !important; min-height: 24px !important; font-size: 12.5px; }
  .hub-grid .ft-logo { width: 16px; height: 16px; }
  .hub-grid .ft-rules { font-size: 11.5px; }
  .hub-grid .ft-rules summary { padding: 4px 0; }
  .hub-grid .ft-table { font-size: 12px; }
  .hub-grid .ft-table td { padding: 3px 5px; }
  /* raccourcis de l'intranet : une ligne */
  .hub-linkbar { flex: none; padding: 8px 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hub-linkbar-l { white-space: nowrap; }
  .hub-chip { white-space: nowrap; flex: none; padding: 5px 11px; font-size: 12.5px; }
}
/* écran moins haut (portable) : bandeau et chiffres resserrés */
@media (min-width: 1100px) and (max-height: 820px) {
  .hub-hero { height: 112px; }
  .hub-hero-txt { padding: 10px 24px; gap: 4px; }
  .hub-hero h1 { font-size: 24px; }
  .hub-hero p { font-size: 14px; }
  .hub-kpi { padding: 7px 12px; }
  .hub-kpi-v { font-size: 21px; }
  .hub-kpi-ico { width: 32px; height: 32px; }
}
/* écran moins large : actualités sur une colonne */
@media (min-width: 1100px) and (max-width: 1400px) and (min-height: 640px) {
  .hub-grid .hub-news-slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hub-grid .hub-news-txt p { -webkit-line-clamp: 4; }
}/* 0.88.1 : contrôles de hauteur */
@media (min-width: 1100px) {
  .hub-grid .hub-news-txt p { overflow: hidden; }
  .hub-grid .hub-top > .hub-lb-me { flex: none; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  .hub { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .hub-grid { gap: 10px; }
  .hub-grid .hub-news-txt p { -webkit-line-clamp: 3; }
  .hub-grid .hub-news-txt h3 { font-size: 15px; }
  .hub-grid .hub-foot .ft-note, .hub-grid .hub-foot > .muted.small { display: none; }
  .hub-grid .hub-lb-chips { display: none; }
  .hub-grid > .hub-card, .hub-side > .hub-card { padding: 10px 12px; gap: 6px; }
  .hub-side { gap: 10px; }
}@media (min-width: 1100px) { .hub-grid .hub-lb-me > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
/* 0.88.1 : écran peu haut (petit portable) — même disposition, cartes de hauteur fixe, la page défile un peu */
@media (min-width: 1100px) and (max-height: 739px) {
  .hub { height: auto; overflow: visible; }
  .hub-grid { flex: none; grid-template-rows: 270px 350px; }
  .hub-hero { height: 130px; }
}
/* écran étroit : titres sur une ligne, colonne latérale plus fine */
@media (min-width: 1100px) and (max-width: 1450px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) 250px; }
  .hub-grid .hub-card-h { min-width: 0; gap: 6px; }
  .hub-grid .hub-card-h h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 15px; }
  .hub-grid .hub-card-h .hub-more { white-space: nowrap; font-size: 12px; }
  .hub-grid .hub-photos .hub-card-h .hub-more, .hub-side .hub-bdays .hub-more, .hub-side .hub-arrivals .hub-more { display: none; }
  .hub-grid .hub-lb-period { max-width: 110px; }
}@media (min-width: 1100px) { .hub-kpi-main { min-width: 0; } .hub-kpi-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
/* ---- Accueil 0.89.0 : sans « Absences aujourd'hui » ni photos (déplacées dans la Messagerie) ; Top contributeurs en grand,
   Accès rapides à côté, Ligue 1 dans la colonne de droite avec anniversaires et arrivants compacts */
.hub-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1050px) { .hub-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hub-kpis { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1100px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .95fr) clamp(340px, 25vw, 430px);
    grid-template-rows: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: "todo news news side" "top top tools side"; }
  .hub-grid > .hub-tools { grid-area: tools; }
  .hub-grid > .hub-photos { display: none; }
  /* colonne de droite : Ligue 1 prend la hauteur disponible */
  .hub-side > .hub-foot { flex: 1 1 auto; min-height: 0; }
  .hub-side > .hub-bdays, .hub-side > .hub-arrivals { flex: none; max-height: 30%; }
  /* accès rapides (carte de la grille) : tuiles logo + nom avec description */
  .hub-grid .hub-tools .hub-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
  .hub-grid .hub-tools .hub-tool { gap: 10px; padding: 8px 10px; }
  .hub-grid .hub-tools .hub-tool-logo { width: 32px; height: 32px; flex: none; }
  .hub-grid .hub-tools .hub-tool-txt { min-width: 0; }
  .hub-grid .hub-tools .hub-tool-txt strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hub-grid .hub-tools .hub-tool-txt span { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hub-grid .hub-tools .hub-tool-go { display: none; }
  /* Top contributeurs en grand : podium à gauche, classement à droite */
  .hub-grid > .hub-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    column-gap: 18px; row-gap: 6px; align-content: stretch; }
  .hub-grid > .hub-top > * { grid-column: 1 / -1; }
  .hub-grid > .hub-top > .hub-lb-podium { grid-column: 1; grid-row: 4; align-self: end; padding-top: 4px; }
  .hub-grid > .hub-top > .hub-lb-list { grid-column: 2; grid-row: 4; align-self: stretch; overflow-y: auto; }
  .hub-grid .hub-top .hub-lb-chips { display: flex; }
  .hub-grid .hub-lb-ava .fd-avatar, .hub-grid .hub-lb-ava.ghost { width: 40px; height: 40px; font-size: 14px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-ava .fd-avatar { width: 50px; height: 50px; font-size: 17px; }
  .hub-grid .hub-lb-who strong { font-size: 13px; }
  .hub-grid .hub-lb-pts { font-size: 14px; } .hub-grid .hub-lb-step.m1 .hub-lb-pts { font-size: 16px; }
  .hub-grid .hub-lb-medal { font-size: 16px; }
  .hub-grid .hub-lb-step .hub-lb-mv { display: inline-block; }
  .hub-grid .hub-lb-block { font-size: 16px; border-radius: 8px 8px 3px 3px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-block { height: 46px; } .hub-grid .hub-lb-step.pos2 .hub-lb-block { height: 32px; } .hub-grid .hub-lb-step.pos3 .hub-lb-block { height: 22px; }
  .hub-grid .hub-lb-row { padding: 5px 8px 5px 4px; gap: 9px; grid-template-columns: 22px 30px minmax(0, 1fr) auto; }
  .hub-grid .hub-lb-row .fd-avatar, .hub-grid .hub-lb-svcdot { width: 30px; height: 30px; font-size: 11px; }
  .hub-grid .hub-lb-period, .hub-grid .hub-lb-svc { max-width: 170px; font-size: 12.5px; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  .hub-grid .hub-lb-ava .fd-avatar, .hub-grid .hub-lb-ava.ghost { width: 34px; height: 34px; font-size: 12px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-ava .fd-avatar { width: 42px; height: 42px; }
  .hub-grid .hub-lb-step.pos1 .hub-lb-block { height: 34px; } .hub-grid .hub-lb-step.pos2 .hub-lb-block { height: 24px; } .hub-grid .hub-lb-step.pos3 .hub-lb-block { height: 16px; }
  .hub-grid .hub-tools .hub-tool { padding: 6px 8px; }
  .hub-grid .hub-tools .hub-tool-logo { width: 28px; height: 28px; }
}
@media (min-width: 1100px) and (max-width: 1450px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr) 330px; }
  .hub-grid .hub-tools .hub-tool-txt span { display: none; }
}
@media (min-width: 1100px) and (max-height: 739px) { .hub-grid { grid-template-rows: 260px 360px; } }
/* ---- Accueil 0.90.0 : plus de rangée « chiffres du jour » (interventions retirées, actions déjà dans « À faire ») ; messages non lus
   en pastille dans le bandeau ; colonne de droite : arrivants et anniversaires compacts, puis Ligue 1 sur toute la hauteur restante */
.hub-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.hub-msg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: 600 12.5px/1.2 var(--f-body); cursor: pointer; white-space: nowrap; transition: border-color .12s; }
.hub-msg svg { width: 15px; height: 15px; flex: none; }
.hub-msg:hover { border-color: var(--lo-orange); }
.hub-msg.on { background: var(--lo-tint); border-color: transparent; color: var(--lo-head); }
.hub-msg.on svg, .hub-msg strong { color: var(--lo-orange); }
.hub-msg strong { font-weight: 800; }
.hub-msg-s { color: var(--muted); font-weight: 500; }
.hub-msg-go { font-size: 16px; line-height: 1; color: var(--muted); }
@media (max-width: 480px) { .hub-msg-s { display: none; } }
@media (min-width: 1100px) {
  .hub-hero { height: clamp(118px, 16vh, 160px); }
  .hub-side > .hub-arrivals, .hub-side > .hub-bdays { flex: none; max-height: 21%; }
  .hub-side > .hub-foot { flex: 1 1 auto; min-height: 0; }
  .hub-grid .hub-foot .ft-sec { padding: 6px 2px 3px; }
  .hub-grid .hub-foot .ft-match { padding: 2px; }
  .hub-grid .hub-foot .ft-in { min-height: 0 !important; height: 22px !important; padding: 0 4px !important; font-size: 12.5px; }
  .hub-grid .hub-foot .ft-ok { width: 18px; height: 18px; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  .hub-hero { height: 112px; }
  .hub-hero-txt { padding: 8px 24px; gap: 3px; }
  .hub-side .hub-arrival-s { display: none; }
  .hub-grid .hub-foot .ft-match { padding: 1px 2px; }
  .hub-grid .hub-foot .ft-sec { padding: 4px 2px 3px; }
  .hub-side > .hub-arrivals, .hub-side > .hub-bdays { max-height: 19%; }
}
/* Messagerie : dernières photos chantier (0.89.0) */
.chat-photos { margin: 0 12px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.chat-photos > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.chat-photos > summary::-webkit-details-marker { display: none; }
.chat-photos-c { color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.chat-photos[open] .chat-photos-c { transform: none; }
.chat-photos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 8px 8px; }
.chat-photo { display: flex; flex-direction: column; min-width: 0; }
.chat-photo-img { position: relative; display: block; aspect-ratio: 1; border: 0; padding: 0; border-radius: 7px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.chat-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.chat-photo-img:hover img { transform: scale(1.05); }
.chat-photo-go { display: flex; align-items: center; justify-content: space-between; gap: 2px; border: 0; background: none; padding: 2px 1px 0; font: 600 10.5px/1.3 var(--f-body); color: var(--muted); cursor: pointer; min-width: 0; }
.chat-photo-go span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-photo-go:hover { color: var(--blue); }/* Fil d'actualité : Célébrations (0.89.0) — colonne de droite sur grand écran, carte compacte sinon */
.fd-right { display: none; }
.fd-celeb-m:empty { display: none; }
@media (min-width: 1280px) {
  .fd-page { grid-template-columns: 250px minmax(0, 1fr) 300px; }
  .fd-right { display: block; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 20px 16px 20px 0; }
  .fd-celeb-m { display: none; }
}
.fd-cel { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; }
.fd-cel-h { font: 800 16px/1.2 var(--f-head); color: var(--ink); margin-bottom: 4px; }
.fd-cel-sub { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 8px; }
.fd-cel-todays { display: flex; flex-direction: column; gap: 6px; }
.fd-cel-today { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: linear-gradient(120deg, #fff1e6, #ffe3cf); color: #7a2d00; }
.fd-cel-today.senior { background: linear-gradient(120deg, #eef3ff, #dfe8ff); color: #22346b; }
.fd-cel-today > div { display: flex; flex-direction: column; min-width: 0; }
.fd-cel-today strong { font-size: 14px; }
.fd-cel-today span { font-size: 12px; opacity: .85; }
.fd-cel-today .fd-avatar { width: 38px; height: 38px; flex: none; }
.fd-cel-list { display: flex; flex-direction: column; gap: 2px; }
.fd-cel-row { display: flex; align-items: center; gap: 9px; padding: 5px 2px; border-radius: 8px; }
.fd-cel-row .fd-avatar { width: 30px; height: 30px; font-size: 11px; flex: none; }
.fd-cel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fd-cel-main strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cel-main span { font-size: 11.5px; color: var(--muted); }
.fd-cel-day { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 800 13px/1 var(--f-head); background: #fff1e6; color: #c24600; }
.fd-cel-years { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 10px; background: #e8eeff; color: #2a4aa8; white-space: nowrap; }
.fd-cel-empty { margin: 2px 0; font-size: 12.5px; color: var(--muted); }
.fd-cel-m { display: flex; align-items: center; gap: 10px; padding: 10px 12px; overflow: hidden; }
.fd-cel-m-h { font-size: 20px; flex: none; }
.fd-cel-m-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.fd-cel-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px; background: var(--surface-2); font-size: 12.5px; white-space: nowrap; }
.fd-cel-chip.today { background: #fff1e6; color: #7a2d00; }
.fd-cel-chip .fd-avatar { width: 24px; height: 24px; font-size: 10px; }
[data-theme="dark"] .fd-cel-today, [data-theme="dark"] .fd-cel-chip.today, [data-theme="dark"] .fd-cel-day { background: #3a2318; color: #ffb084; }
[data-theme="dark"] .fd-cel-today.senior, [data-theme="dark"] .fd-cel-years { background: #1f2a4a; color: #a9c0ff; }@media (min-width: 1100px) and (max-height: 960px) { .hub-grid .hub-news-txt p { -webkit-line-clamp: 4; } }
@media (min-width: 1100px) and (max-height: 820px) { .hub-grid .hub-news-txt p { -webkit-line-clamp: 2; } }

/* PointageNav 0.91.0 : managers, validation du manager, commentaires, relances */
.pill.pn-mgr-ok { background: var(--tint-blue); color: var(--blue-dark, var(--blue)); }
.pill.pn-mgr-wait { background: color-mix(in srgb, #e0a64b 18%, var(--surface)); color: #9a5b00; }
.pill.pn-mgr-none { background: var(--tint-red); color: var(--danger); }
.pn-mgr-cell .small { margin-bottom: 3px; white-space: nowrap; }
.pn-comments { margin-top: 3px; color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-comments strong { color: var(--ink); font-weight: 600; }
.pn-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.pn-team { padding: 10px 12px; }
.pn-team-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
select.pn-mgr-missing { border-color: var(--danger); }
.pn-mail-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 8px; background: #eef0f4; }
@media (max-width: 700px) { .pn-mail-frame { height: 440px; } .pn-comments { max-width: 220px; } }.pn-admin td select[aria-label^='Manager de'] { width: auto; min-width: 220px; max-width: 320px; }

/* ------------------------------------------------------------ Absences (0.94.0) : planning, demandes, validation, soldes, personnes */
.abs-tabbar { padding: 0 24px; margin-top: -4px; }
.abs-tabs { flex-wrap: wrap; }
.abs-tabs button svg { width: 16px; height: 16px; }
.abs-tabs .badge { margin-left: 2px; min-width: 18px; height: 18px; font-size: 11px; background: var(--signal); color: #fff; }
.abs-head-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.abs-body { display: grid; gap: 14px; align-content: start; }
.abs-help { margin: 0; }
.abs-warn { color: var(--ink-red); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 85%, #000); border-color: var(--ok); }
.abs-pill-annulation { background: color-mix(in srgb, #7a5bb5 16%, var(--surface)); color: color-mix(in srgb, #7a5bb5 65%, var(--ink)); }
.abs-pill-annulee { background: var(--line-2); color: var(--muted); }

/* barre d'outils du planning */
.abs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.abs-toolbar .spacer { flex: 1; }
.abs-month { display: flex; align-items: center; gap: 2px; }
.abs-month strong { min-width: 150px; text-align: center; font: 600 19px/1.1 var(--f-cond); letter-spacing: .01em; }
.abs-toolbar input[type=search], .abs-toolbar select { width: auto; flex: none; }
.abs-q { width: 240px !important; max-width: 100%; }
.abs-only { white-space: nowrap; }
.abs-stats { white-space: nowrap; }

/* grille du mois : une ligne par personne, une colonne par jour, chaque case en deux demi-journées */
.abs-plan-wrap { overflow: auto; max-height: calc(100vh - 290px); min-height: 220px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.abs-plan { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.abs-plan th, .abs-plan td { border-bottom: 1px solid var(--line-2); padding: 0; }
.abs-plan thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); }
.abs-plan tfoot td, .abs-plan tfoot th { position: sticky; bottom: 0; z-index: 3; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.abs-pc { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 210px; max-width: 240px; padding: 5px 10px !important; border-right: 1px solid var(--line); }
.abs-plan thead .abs-pc, .abs-plan tfoot .abs-pc { z-index: 4; background: var(--surface-2); }
.abs-corner { font-weight: 500; color: var(--muted); font-size: 12px; }
.abs-pn { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.abs-pj { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abs-me { margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--tint-orange); color: var(--ink-orange); font: 600 10.5px/16px var(--f-body); vertical-align: 1px; }
.abs-row.mine .abs-pc { box-shadow: inset 3px 0 0 var(--signal); }
.abs-row.inactive .abs-pn { color: var(--muted); font-style: italic; }
.abs-grp .abs-pc { background: var(--surface-2); font: 600 13px/1.2 var(--f-cond); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding-top: 8px !important; }
.abs-grp td { background: var(--surface-2); }
.abs-grp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.abs-dh { min-width: 30px; width: 30px; padding: 4px 0 !important; text-align: center; font-weight: 500; color: var(--ink-3); border-left: 1px solid var(--line-2); }
.abs-dh .abs-dow { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.abs-dh .abs-dn { display: block; font: 600 15px/1.1 var(--f-cond); color: var(--ink-2); }
.abs-dh.mon { border-left-color: var(--line); }
.abs-dh.we, .abs-dh.hol { color: var(--muted-2); }
.abs-dh.hol .abs-dn { color: var(--ink-plan); }
.abs-dh.today { background: var(--tint-orange); }
.abs-dh.today .abs-dn { color: var(--ink-orange); }
.abs-cell { height: 34px; border-left: 1px solid var(--line-2); position: relative; }
.abs-cell.we { background: var(--weekend); }
.abs-cell.hol { background: repeating-linear-gradient(-45deg, var(--holiday-stripe) 0 5px, var(--surface) 5px 10px); }
.abs-cell.today { box-shadow: inset 1px 0 0 var(--signal), inset -1px 0 0 var(--signal); }
.abs-cell.addable { cursor: copy; }
.abs-cell.addable:hover { background: var(--tint-blue); }
.abs-cell.addable:hover::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--blue); font-weight: 700; }
.abs-cell.on { cursor: pointer; }
.abs-cv { position: absolute; inset: 4px 2px; display: flex; gap: 1px; }
.abs-h { flex: 1; border-radius: 0; background: var(--c); }
.abs-h-am { border-radius: 5px 0 0 5px; }
.abs-h-pm { border-radius: 0 5px 5px 0; }
.abs-h.empty { background: transparent; }
.abs-h.st-en_attente { background: repeating-linear-gradient(-45deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 35%, var(--surface)) 4px 8px); }
.abs-h.st-annulation { opacity: .55; outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.abs-cell.on:hover .abs-h:not(.empty) { filter: brightness(1.12); }
.abs-foot th { font-weight: 600; font-size: 12px; color: var(--ink-2); }
.abs-cnt { text-align: center; font: 600 13px/28px var(--f-cond); color: var(--muted-2); border-left: 1px solid var(--line-2); }
.abs-cnt.has { color: var(--ink); }
.abs-cnt.we { background: var(--weekend); }
.abs-cnt.today { background: var(--tint-orange); }

/* légende */
.abs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.abs-leg { display: inline-flex; align-items: center; gap: 6px; }
.abs-leg-sw { width: 18px; height: 12px; border-radius: 4px; background: var(--c); }
.abs-leg-sw.st-en_attente { background: repeating-linear-gradient(-45deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 35%, var(--surface)) 3px 6px); }
.abs-leg-sw.st-annulation { opacity: .55; outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.abs-leg-sw.half { background: linear-gradient(90deg, var(--c) 0 50%, transparent 50%); border: 1px solid var(--line); }
.abs-leg-sw.we { background: var(--weekend); border: 1px solid var(--line); }

/* mes absences */
.abs-me-card { max-width: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.abs-me-who { display: flex; align-items: center; gap: 12px; }
.abs-me-who .fd-avatar { width: 44px; height: 44px; font-size: 16px; }
.abs-empty-card { max-width: 640px; }
.abs-bals { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.abs-bal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 6px; }
.abs-bal.neg { border-color: var(--danger); }
.abs-bal-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.abs-bal-head .muted { margin-left: auto; }
.abs-bal-num { font-size: 13px; color: var(--muted); }
.abs-bal-num strong { font: 600 30px/1 var(--f-cond); color: var(--ink); }
.abs-bal.neg .abs-bal-num strong { color: var(--ink-red); }
.abs-bal-bar { display: flex; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.abs-bal-bar .taken { background: var(--ink-2); }
.abs-bal-bar .pend { background: repeating-linear-gradient(-45deg, var(--signal) 0 3px, var(--tint-orange) 3px 6px); }
.small-bals .abs-bal { padding: 8px 10px; }
.small-bals .abs-bal-num strong { font-size: 22px; }
.abs-year { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.abs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.abs-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.abs-sec h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; font-size: 15px; }
.abs-items { display: grid; gap: 6px; }
.abs-item { display: flex; align-items: stretch; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px 10px 0; cursor: pointer; overflow: hidden; }
.abs-item:hover { border-color: var(--ink-3); }
.abs-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.abs-item-bar { width: 5px; flex: none; border-radius: 0 4px 4px 0; }
.abs-item.st-en_attente .abs-item-bar { background: repeating-linear-gradient(-45deg, var(--signal) 0 4px, var(--tint-orange) 4px 8px) !important; }
.abs-item.st-refusee, .abs-item.st-annulee { opacity: .7; }
.abs-item-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.abs-item-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.abs-item-s { color: var(--ink-2); font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.abs-days { font: 600 13px/1 var(--f-cond); color: var(--ink-3); padding: 2px 7px; border-radius: 8px; background: var(--line-2); }
.abs-note { white-space: pre-wrap; }
.abs-item-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* à valider */
.abs-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 4px 0; }
.abs-bulk .spacer { flex: 1; }
.abs-reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.abs-req { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 1px 2px rgba(42,54,81,.06); }
.abs-req.cancel { border-color: color-mix(in srgb, #7a5bb5 45%, var(--line)); }
.abs-req-side { width: 6px; flex: none; }
.abs-req-body { flex: 1; min-width: 0; padding: 12px 14px; display: grid; gap: 7px; }
.abs-req-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.abs-req-top .spacer { flex: 1; }
.abs-req-who { font-size: 15px; }
.abs-req-what { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.abs-req-note { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; white-space: pre-wrap; }
.abs-overlap { color: var(--ink-ochre); }
.abs-req-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.abs-req-acts .spacer { flex: 1; }

/* suivi, soldes, personnes */
.abs-filters { align-items: end; }
.abs-filters .spacer { flex: 1; }
.abs-table td { vertical-align: top; }
.abs-bal-in { width: 80px; text-align: right; }
.abs-rest { font-weight: 700; }
.abs-rest.neg { color: var(--ink-red); }
.abs-ppl select { min-width: 190px; max-width: 260px; }
.abs-mat-in { width: 100px; }
.abs-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.abs-kpi { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 14px; min-width: 130px; }
.abs-kpi strong { font: 600 26px/1.1 var(--f-cond); }
.abs-kpi span { font-size: 12.5px; color: var(--muted); }

/* formulaire et détail */
.abs-modal { width: min(560px, calc(100vw - 24px)); }
.abs-form .form-grid { grid-template-columns: 1fr 1fr; }
.abs-form-who { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.abs-sum { padding: 10px 12px; border-radius: 8px; background: var(--tint-blue); display: grid; gap: 4px; font-size: 13.5px; }
.abs-sum-n { font: 600 20px/1 var(--f-cond); color: var(--ink); }
.abs-detail { display: grid; gap: 12px; }
.abs-detail-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.abs-detail-head > div { flex: 1; min-width: 0; }
.abs-detail-dot { width: 14px; height: 40px; border-radius: 5px; background: var(--c); flex: none; }
.abs-dl { display: grid; gap: 4px; }
.abs-dl-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.abs-dl-k { color: var(--muted); }
.abs-dl-v { white-space: pre-wrap; }
.abs-hist summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.abs-hist ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* PointageNav : cases inscrites par le module Absences */
.pn-c.pn-lock { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: var(--ink); font-weight: 600; cursor: not-allowed; position: relative; }
.pn-c.pn-lock.st-en_attente { background: repeating-linear-gradient(-45deg, var(--tint-hl) 0 5px, var(--surface) 5px 10px); }
.pn-lock-i { font-size: 10px; margin-left: 2px; }
.pn-abs-note { border-color: var(--line); background: var(--surface-2); }

@media (max-width: 860px) {
  .abs-tabbar { padding: 0 12px; }
  .abs-pc { min-width: 140px; max-width: 150px; padding: 4px 6px !important; }
  .abs-pj { display: none; }
  .abs-dh { min-width: 26px; width: 26px; }
  .abs-plan-wrap { max-height: calc(100vh - 240px); }
  .abs-q { width: 100%; order: 10; }
  .abs-reqs { grid-template-columns: 1fr; }
  .abs-form .form-grid { grid-template-columns: 1fr 1fr; }
  .abs-dl-row { grid-template-columns: 110px 1fr; }
  .abs-item { flex-wrap: wrap; }
  .abs-item-acts { width: 100%; justify-content: flex-start; padding-left: 17px; }
}
.abs-grp-n { margin-left: 8px; padding: 0 7px; border-radius: 9px; background: var(--line-2); color: var(--muted); font: 600 11px/17px var(--f-body); letter-spacing: 0; }
.abs-nofiche td { background: var(--tint-cream); }
/* absences : pièces jointes */
.abs-files-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.abs-files { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.abs-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px 3px 9px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink); text-decoration: none; }
a.abs-file:hover { border-color: var(--ink-3); }
.abs-file a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.abs-file-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.abs-file-x:hover { color: var(--danger); }
.abs-dfiles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.abs-dfiles-h { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 13.5px; }
/* absences : soldes CP et RTT séparés, durée en demi-journées */
.abs-bal { border-top: 4px solid var(--c, var(--line)); }
.abs-bal.missing { opacity: .75; border-style: dashed; border-top-style: solid; }
.abs-bal-head strong { font-size: 15px; }
.abs-bal-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.abs-bal-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: var(--r-md); background: var(--surface); }
.abs-bal-fill .spacer { flex: 1; }
.abs-bal-fill select, .abs-bal-fill input { width: auto; }
.abs-bal-table th.abs-b-head { text-align: center; border-bottom: 3px solid var(--c); font-size: 13.5px; }
.abs-bal-table td.abs-b-conges, .abs-bal-table th.abs-b-conges { background: color-mix(in srgb, #2e8b6e 6%, var(--surface)); }
.abs-bal-table td.abs-b-rtt, .abs-bal-table th.abs-b-rtt { background: color-mix(in srgb, #2a7f8f 6%, var(--surface)); }
.abs-bal-table .first { border-left: 2px solid var(--line); }
.abs-sum-bal strong { color: var(--ink); }
.abs-halves { gap: 10px; }
.abs-halves label { flex: 1; }
.abs-bal-table input.abs-bal-in { width: 76px; min-width: 0; }

/* ------------------------------------------------------------ Boîte à outils (0.96.0) */
/* 1.08.0 : recherche, filtre par rubrique, récents ; une couleur par rubrique (--tc) */
.tools-page { --tc-alu: #24798a; padding: 0 22px 28px; }
:root[data-theme="dark"] .tools-page { --tc-alu: #5cc3d4; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .tools-page { --tc-alu: #5cc3d4; } }
.tools-page [data-grp] { --tc: var(--blue); }
.tools-page [data-grp="plans"] { --tc: var(--ink-2); }
.tools-page [data-grp="bat"] { --tc: var(--ok); }
.tools-page [data-grp="metal"] { --tc: var(--ink-ochre); }
.tools-page [data-grp="alu"] { --tc: var(--tc-alu); }
.tools-page [data-grp="cn"] { --tc: var(--brand-steel); }
.tools-page [data-grp="all"] { --tc: var(--ink); }
.tools-intro { margin: 0 0 14px; max-width: 760px; }
.tools-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 -22px 6px; padding: 10px 22px; background: var(--paper); border-bottom: 1px solid var(--line-2); }
.tools-search { position: relative; flex: 0 1 340px; min-width: 220px; display: flex; align-items: center; }
.tools-search > span svg { position: absolute; left: 11px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.tools-page .tools-bar .tools-search input.tools-q { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.tools-search input.tools-q:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--tint-blue); }
.tools-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tools-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.tools-chip svg { width: 16px; height: 16px; color: var(--tc); }
.tools-chip em { font-style: normal; font-size: 12px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-align: center; }
.tools-chip:hover:not(:disabled) { border-color: var(--tc); }
.tools-chip.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); color: var(--ink); }
.tools-chip.on em { background: var(--tc); color: var(--surface); }
.tools-chip:disabled { opacity: .45; cursor: default; }
.tools-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tools-sec { margin-top: 26px; }
.tools-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tools-sec-head > .tc-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tc); color: #fff; }
:root[data-theme="dark"] .tools-sec-head > .tc-ico { color: var(--paper); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .tools-sec-head > .tc-ico { color: var(--paper); } }
.tools-sec-head > .tc-ico svg { width: 19px; height: 19px; }
.tools-sec-head h2 { margin: 0; font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
.tools-sec-head h2 em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tools-sec-head p { margin: 1px 0 0; font-size: 13px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tool-card { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 3px 13px; align-items: start; padding: 14px; border: 1px solid var(--line); border-left: 3px solid var(--tc, var(--blue)); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: var(--tc, var(--blue)); box-shadow: 0 6px 18px rgba(20, 30, 50, .09); transform: translateY(-1px); }
.tool-card:focus-visible, .tool-tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tool-card .tc-ico { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--tc, var(--blue)) 13%, var(--surface)); color: var(--tc, var(--blue)); }
.tool-card .tc-ico svg { width: 22px; height: 22px; }
.tool-card strong { font-size: 15px; }
.tool-card span.tc-sub { font-size: 13px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Documents PDF : l'éditeur en vedette à gauche, les raccourcis en tuiles à droite */
.tools-pdf { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.tools-pdf.no-hero { grid-template-columns: minmax(0, 1fr); }
.tool-card.tool-hero { grid-template-columns: 52px 1fr; grid-template-rows: auto 1fr auto; padding: 18px; border-left-width: 1px; background: linear-gradient(140deg, var(--surface) 45%, var(--tint-blue)); }
.tool-card.tool-hero .tc-ico { grid-row: span 3; width: 52px; height: 52px; border-radius: 14px; background: var(--tc); color: #fff; }
.tool-card.tool-hero .tc-ico svg { width: 28px; height: 28px; }
.tool-card.tool-hero strong { font-size: 18px; }
.tool-card.tool-hero span.tc-sub { -webkit-line-clamp: 4; }
.tool-hero-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--blue); font-weight: 700; font-size: 14px; }
.tool-hero-go svg { width: 16px; height: 16px; transition: transform .15s; }
.tool-hero:hover .tool-hero-go svg { transform: translateX(3px); }
.tools-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; align-content: start; }
.tool-tile { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.tool-tile:hover { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 6%, var(--surface)); }
.tool-tile .tc-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--tc) 13%, var(--surface)); color: var(--tc); }
.tool-tile .tc-ico svg { width: 18px; height: 18px; }
.tools-recent { margin-top: 16px; }
.tools-recent .tools-tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tools-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tools-h svg { width: 15px; height: 15px; }
.tools-empty { margin: 40px auto; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .tools-page { padding: 0 14px 24px; }
  .tools-bar { margin: 0 -14px 4px; padding: 8px 14px; }
  .tools-search { flex: 1 1 100%; }
  .tools-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .tools-chips::-webkit-scrollbar { display: none; }
  .tools-pdf { grid-template-columns: minmax(0, 1fr); }
  .tools-tiles, .tools-recent .tools-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-tile { font-size: 13px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
}
.main.pe-fill { height: 100vh; height: 100dvh; }
.main.pe-fill > .pe-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.pe-host { padding: 0 14px 12px; }
.pe-host > .pe-loading { padding: 40px; text-align: center; color: var(--muted); }
.tools-foot { margin: 22px 0 0; max-width: 760px; }

/* ---------- Boîte à outils : calculateurs (assets/outils-calc.js) */
.bx-host:not(.pe-host) { padding: 0 22px 28px; }
.bx-host > .pe-loading { padding: 40px; text-align: center; color: var(--muted); }
.bx-intro { margin: 0 0 14px; max-width: 820px; }
.bx-cols { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.bx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; min-width: 0; }
.bx-form { display: grid; gap: 12px; }
.bx-out { display: grid; gap: 10px; }
.bx-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 0; }
.bx-f { display: grid; gap: 4px; min-width: 0; }
.bx-f > span em { font-style: normal; color: var(--muted); font-weight: 400; }
.bx-f small { font-weight: 400; line-height: 1.35; }
.bx-f input:not([type=checkbox]), .bx-f select { min-height: 36px; font-size: 14.5px; }
.bx-check { font-size: 13.5px; }
.bx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; position: relative; }
.bx-row3 .bx-del, .bx-sit .bx-del, .bx-segrow .bx-del { align-self: end; }
.bx-row3:has(.bx-del) { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.bx-sit { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) auto; gap: 8px; align-items: end; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.bx-segrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.bx-bendrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 10px 8px; border-left: 3px solid var(--signal); background: var(--tint-blue); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.bx-addrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; align-items: end; }
.bx-addrow .bx-check { align-self: center; }
.bx-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bx-gap { height: 4px; }
.bx-formula { font-family: var(--f-cond); font-size: 20px; margin: 0; color: var(--ink); }
.bx-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; flex-wrap: wrap; }
.bx-kv > span { color: var(--ink-2); }
.bx-kv > strong { font-variant-numeric: tabular-nums; text-align: right; }
.bx-kv > .small { flex-basis: 100%; text-align: right; }
.bx-big { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--tint-blue); border-left: 4px solid var(--signal); }
.bx-big > span { font-size: 13px; color: var(--ink-2); }
.bx-big > strong { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
.bx-big > small { font-size: 12.5px; }
.bx-note { margin: 2px 0 0; line-height: 1.45; }
.bx-out .notice, .bx-form .notice { margin: 0; }
.bx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bx-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: 14px; }
.bx-checks li > div { display: grid; gap: 1px; }
.bx-chk-i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.bx-checks li.ok .bx-chk-i { background: var(--tint-green); color: var(--ok); }
.bx-checks li.ko .bx-chk-i { background: var(--tint-red); color: var(--danger); }
.bx-checks li.ko > div { color: var(--danger); font-weight: 600; }
.bx-tw table.list { min-width: 0; }
.bx-tw table.list th, .bx-tw table.list td { padding: 7px 10px; font-size: 13.5px; }
.bx-tw td.num, .bx-tw th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bx-tw tr.bx-sel td { background: var(--tint-hl); font-weight: 600; }
.bx-fig { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; }
.bx-svg { display: block; width: 100%; height: auto; }
.bx-fig .bx-svg { max-height: 320px; }
.bx-svg.small { max-width: 340px; margin: 0 auto; }
.bx-preview { padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); }
.bx-preview .bx-kv:last-child { border-bottom: 0; }
.bx-treat { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.bx-treat.focus { animation: bx-flash 1.6s ease-out; }
@keyframes bx-flash { 0% { background: var(--tint-hl); } 100% { background: transparent; } }
.bx-group { display: grid; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bx-group h3 { margin: 0; }
.bx-bars, .bx-sheets { display: grid; gap: 10px; }
.bx-sheets { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.bx-bar, .bx-sheet { display: grid; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; color: #2A3651; }
.bx-bar-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.bx-bar-h .muted { color: #667085; }
.bx-svg.bar { min-height: 30px; }
.bx-ral { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 70vh; overflow: auto; padding: 2px; }
.bx-ral-chip { display: grid; gap: 2px; align-content: end; min-height: 64px; padding: 6px 7px; border: 1px solid rgba(0, 0, 0, .12); border-radius: var(--r-sm); font: 700 13px var(--f-body); text-align: left; cursor: pointer; }
.bx-ral-chip small { font-weight: 500; font-size: 11px; line-height: 1.2; opacity: .9; }
.bx-ral-chip.on { outline: 3px solid var(--signal); outline-offset: 1px; }
.bx-ral-near { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.bx-ral-big { display: grid; gap: 2px; padding: 26px 16px 14px; border-radius: var(--r-md); border: 1px solid rgba(0, 0, 0, .12); }
.bx-ral-big strong { font-size: 24px; }
.bx-pickrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bx-memo { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13.5px; line-height: 1.45; }
@media (max-width: 900px) {
  .bx-host:not(.pe-host) { padding: 0 12px 20px; }
  .bx-cols { grid-template-columns: minmax(0, 1fr); }
  .bx-row3, .bx-row3:has(.bx-del) { grid-template-columns: 1fr 1fr; }
}

/* ---------- Boîte à outils : comparateur de plans et métré (assets/outils-plans.js) */
.bx-plans { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.bx-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bx-slot { flex: 1 1 300px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.bx-slot.on { border-style: solid; }
.bx-slot-txt { flex: 1 1 auto; display: grid; min-width: 0; }
.bx-slot-txt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-slot-tag { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; font-weight: 800; color: #fff; background: #d62828; }
.bx-slot-tag.b { background: #169646; }
.bx-slot-tag.m { background: var(--tint-blue); color: var(--blue); }
.bx-slot-tag svg { width: 18px; height: 18px; }
.bx-pagesel { width: auto !important; min-height: 32px !important; padding: 4px 8px !important; font-size: 13px !important; }
.bx-work { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 10px; }
.bx-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 6px; }
.bx-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bx-toolbar .spacer { flex: 1; }
.bx-seg button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.bx-seg button:disabled { opacity: .45; cursor: not-allowed; }
.bx-zoombar { display: flex; gap: 4px; }
.bx-mix { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bx-mix input { width: 150px; }
.bx-view { flex: 1 1 auto; min-height: 280px; overflow: auto; position: relative; background: #8a919c; border-radius: var(--r-sm); cursor: grab; outline: none; }
.bx-view:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.bx-view.grabbing, .bx-view.grab { cursor: grabbing; }
.bx-view.drawing { cursor: crosshair; }
.bx-view.drawing .bx-movl { touch-action: none; }
.bx-stage { position: relative; margin: 8px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.bx-stage.side { display: grid; grid-template-columns: 1fr 1fr; }
.bx-half + .bx-half { border-left: 6px solid #8a919c; }
.bx-half { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.bx-layer { position: absolute; inset: 0; overflow: hidden; }
.bx-cv { position: absolute; display: block; image-rendering: auto; }
.bx-cv.full { inset: 0; width: 100%; height: 100%; }
.bx-ovl, .bx-movl { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bx-ovl { pointer-events: none; }
.bx-zone { fill: rgba(231, 82, 0, .06); stroke: #E75200; stroke-width: 2.5; }
.bx-ovl g.hot .bx-zone { fill: rgba(231, 82, 0, .22); stroke-width: 4; }
.bx-zone-n { fill: #E75200; font: 800 16px Arial, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.bx-curtain { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #E75200; pointer-events: none; }
.bx-tagcorner { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 6px; color: #fff; font-weight: 800; background: #d62828; }
.bx-tagcorner.b { background: #169646; }
.bx-empty, .bx-busy { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; padding: 20px; text-align: center; color: #2A3651; }
.bx-empty p { max-width: 460px; margin: 0 auto; color: #667085; }
.bx-empty .btn { justify-self: center; }
.bx-cmp-info { min-height: 18px; }
.bx-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.bx-side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 0 0; }
.bx-side .bx-f select, .bx-side .bx-f input { min-height: 34px; font-size: 14px; }
.bx-side .notice { margin: 0; }
.bx-legend { display: grid; gap: 4px; font-size: 13px; }
.bx-legend span { display: flex; align-items: center; gap: 8px; }
.bx-legend i { width: 18px; height: 10px; border-radius: 2px; }
.bx-nudge { display: flex; flex-wrap: wrap; gap: 4px; }
.bx-zones { display: grid; gap: 3px; max-height: 260px; overflow: auto; }
.bx-zone-item { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bx-zone-item:hover { border-color: var(--blue); }
.bx-zone-item b { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: #E75200; color: #fff; font-size: 12px; }
.bx-scale { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
.bx-mlist { display: grid; gap: 6px; }
.bx-mrow { display: grid; gap: 4px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.bx-mrow.sel { border-color: var(--blue); background: var(--tint-blue); }
.bx-mrow-h { display: flex; gap: 6px; align-items: center; }
.bx-mrow-h .bx-mname { flex: 1 1 auto; min-height: 30px !important; padding: 3px 6px !important; font-size: 13.5px !important; }
.bx-mcol { width: 28px !important; height: 28px !important; padding: 1px !important; flex: none; }
.bx-mrow-v { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.bx-mrow-v .check { font-size: 12.5px; }
.bx-totals { display: grid; }
.bx-mitem { cursor: pointer; }
.bx-view:not(.drawing) .bx-mitem:hover polyline, .bx-view:not(.drawing) .bx-mitem:hover polygon { stroke-width: 4; }
.bx-mlab { font-family: Arial, sans-serif; font-weight: 700; paint-order: stroke; stroke: #fff; text-anchor: middle; pointer-events: none; }
.bx-mcnt { fill: #fff; font-family: Arial, sans-serif; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.bx-hdl { fill: #fff; stroke: #2A3651; stroke-width: 1.5; cursor: move; }
@media (max-width: 900px) {
  .bx-work { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(360px, 1fr) auto; }
  .bx-side { max-height: none; overflow: visible; }
  .main.pe-fill:has(.bx-plans) { height: auto; }
  .bx-view { min-height: 60vh; }
}

/* ---------- éditeur PDF */
.pe { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.pe-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; }
.pe-ic svg { width: 100%; height: 100%; }
.pe-bar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pe-bar-l, .pe-bar-r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pe-bar-l { flex: 1 1 auto; }
.pe-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: 0 0 auto; }
.pe-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 360px; }
.pe-tb { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; flex: 0 0 auto; }
.pe-tb:hover:not(:disabled) { background: var(--line-2); }
.pe-tb:disabled { opacity: .35; cursor: default; }
.pe-tb[aria-pressed=true] { background: var(--press); color: #fff; }
.pe-mbtn { gap: 6px; }
.pe-mbtn .pe-ic, .pe-savebtn .pe-ic { width: 17px; height: 17px; }
.pe-savebtn { gap: 6px; margin-left: 4px; }
.pe .pe-zoom { width: auto; min-height: 32px; padding: 0 6px; font-size: 13px; }
.pe-pagebox { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.pe .pe-pagein { width: 44px; min-height: 30px; padding: 0 4px; text-align: center; font-size: 13px; }
.pe-tools { flex: 0 0 auto; display: flex; align-items: stretch; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; background: var(--surface); }
.pe-tool { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 58px; padding: 4px 4px 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 11px; line-height: 1.1; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.pe-tool:hover { background: var(--line-2); }
.pe-tool[aria-pressed=true] { background: var(--tint-blue); border-color: var(--blue); color: var(--blue-dark); font-weight: 600; }
.pe-tool .pe-ic { width: 21px; height: 21px; }
.pe-tsep { width: 1px; margin: 4px 3px; background: var(--line); flex: 0 0 auto; }
.pe-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr) 286px; }
.pe-noside .pe-body { grid-template-columns: 0 minmax(0, 1fr) 286px; }
.pe-noprops .pe-body { grid-template-columns: 196px minmax(0, 1fr) 0; }
.pe-noside.pe-noprops .pe-body { grid-template-columns: 0 minmax(0, 1fr) 0; }
.pe-noside .pe-side, .pe-noprops .pe-props { display: none; }
.pe-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface-2); }
.pe-side-acts { display: grid; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.pe-side-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.pe-side-row .pe-tb { width: 28px; height: 28px; }
.pe-side-row .pe-tb .pe-ic { width: 17px; height: 17px; }
.pe-side-row .btn-sm { width: 100%; justify-content: center; gap: 6px; }
.pe-side-row .btn-sm .pe-ic { width: 16px; height: 16px; }
.pe-side-info { font-size: 12px; color: var(--muted); flex: 1; padding-left: 2px; }
.pe-thumbs { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 6px 30px; }
.pe-th { position: relative; display: grid; justify-items: center; gap: 4px; padding: 5px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; outline: none; }
.pe-th:hover { background: var(--line-2); }
.pe-th.cur { border-color: var(--line); }
.pe-th.sel { border-color: var(--blue); background: var(--tint-blue); }
.pe-th:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.pe-th.dragging { opacity: .4; }
.pe-th.drop-before::before, .pe-th.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--signal); }
.pe-th.drop-before::before { top: -8px; }
.pe-th.drop-after::after { bottom: -8px; }
.pe-th-pg { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .22); }
.pe-th-cv, .pe-th-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-th-svg { pointer-events: none; }
.pe-th-n { font-size: 12px; color: var(--muted); font-weight: 600; }
.pe-th.sel .pe-th-n { color: var(--blue-dark); }
.pe-grid .pe-body { grid-template-columns: minmax(0, 1fr) 0 286px; }
.pe-grid.pe-noprops .pe-body { grid-template-columns: minmax(0, 1fr) 0 0; }
.pe-grid .pe-view { display: none; }
.pe-grid .pe-side { border-right: 0; }
.pe-grid .pe-thumbs { flex-direction: row; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; justify-content: flex-start; gap: 18px 14px; padding: 18px; }
.pe-grid .pe-th.drop-before::before, .pe-grid .pe-th.drop-after::after { top: 0; bottom: 0; left: auto; right: auto; width: 3px; height: auto; }
.pe-grid .pe-th.drop-before::before { left: -9px; }
.pe-grid .pe-th.drop-after::after { right: -9px; }
.pe-view { position: relative; min-height: 0; overflow: auto; background: color-mix(in srgb, var(--paper) 70%, #8a94a6 30%); overscroll-behavior: contain; }
.pe-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 18px 60px; min-width: min-content; }
.pe-page { position: relative; flex: 0 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.pe-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; user-select: none; -webkit-user-select: none; }
.pe-pnum { position: absolute; right: 0; bottom: -17px; font-size: 11px; color: var(--ink-3); pointer-events: none; }
.pe[data-tool=select] .pe-svg { cursor: default; }
.pe[data-tool=select] .pe-o { cursor: move; }
.pe:not([data-tool=select]) .pe-svg { cursor: crosshair; }
.pe[data-tool=text] .pe-svg, .pe[data-tool=edittext] .pe-svg { cursor: text; }
.pe:not([data-tool=select]):not([data-tool=text]) .pe-o { pointer-events: none; }
.pe .pe-hit { pointer-events: all; }
.pe-hd { fill: #fff; stroke: #1f6fb2; stroke-width: 1.5; cursor: pointer; }
.pe-hd[data-h=nw], .pe-hd[data-h=se] { cursor: nwse-resize; }
.pe-hd[data-h=ne], .pe-hd[data-h=sw] { cursor: nesw-resize; }
.pe-hd[data-h=n], .pe-hd[data-h=s] { cursor: ns-resize; }
.pe-hd[data-h=e], .pe-hd[data-h=w] { cursor: ew-resize; }
.pe-hd[data-h=p1], .pe-hd[data-h=p2] { cursor: crosshair; }
.pe-hd-rot { fill: #1f6fb2; stroke: #fff; cursor: grab; }
.pe-selbox { fill: none; stroke: #1f6fb2; stroke-width: 1.2; stroke-dasharray: 5 3; pointer-events: none; }
.pe-selline { stroke: #1f6fb2; stroke-width: 1.2; stroke-dasharray: 4 3; pointer-events: none; }
.pe-hov { fill: rgba(31, 111, 178, .12); stroke: #1f6fb2; pointer-events: none; }
.pe-hit-res { fill: rgba(231, 82, 0, .18); stroke: rgba(231, 82, 0, .6); pointer-events: none; }
.pe-hit-cur { fill: rgba(231, 82, 0, .35); stroke: #E75200; pointer-events: none; }
.pe-marq { fill: rgba(31, 111, 178, .08); stroke: #1f6fb2; stroke-dasharray: 4 3; pointer-events: none; }
.pe-cropmask { fill: rgba(20, 28, 45, .45); pointer-events: none; }
.pe-cropline { fill: none; stroke: #E75200; pointer-events: none; }
.pe-form { position: absolute; inset: 0; pointer-events: none; }
.pe-field { position: absolute; box-sizing: border-box; min-height: 0; margin: 0; padding: 0 2px; border: 1px solid rgba(31, 111, 178, .45); border-radius: 2px; background: rgba(220, 234, 252, .82); color: #000; font-family: Helvetica, Arial, sans-serif; line-height: 1.1; pointer-events: auto; resize: none; }
.pe-field:focus { outline: 2px solid #1f6fb2; background: #fff; }
.pe-field[type=checkbox], .pe-field[type=radio] { accent-color: #1f6fb2; cursor: pointer; }
select.pe-field { padding: 0; }
.pe:not([data-tool=select]) .pe-field { pointer-events: none; opacity: .75; }
.pe-ta { position: absolute; z-index: 5; box-sizing: border-box; margin: 0; border: 1.5px dashed #1f6fb2; border-radius: 0; outline: none; resize: none; overflow: hidden; transform-origin: 0 0; min-height: 0; box-shadow: 0 0 0 3px rgba(31, 111, 178, .15); }
.pe-props { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.pe-props-head { display: flex; align-items: center; gap: 4px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); }
.pe-tabs { display: flex; flex: 1; gap: 2px; }
.pe-tabs button { flex: 1; padding: 7px 4px 8px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pe-tabs button[aria-pressed=true] { color: var(--ink); border-bottom-color: var(--signal); }
.pe-props-x { width: 28px; height: 28px; display: none; }
.pe-props-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 12px 30px; display: grid; align-content: start; gap: 10px; }
.pe-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pe-ph strong { font-size: 14.5px; }
.pe-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pe-row { display: grid; gap: 4px; }
.pe-lab { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pe-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pe-ctl > select, .pe-ctl > input[type=text], .pe-ctl > textarea { width: 100%; }
.pe-ctl textarea { min-height: 70px; resize: vertical; font-size: 13.5px; }
.pe-sw { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pe-swc { width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0, 0, 0, .25); border-radius: 50%; cursor: pointer; }
.pe-swc.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.pe-swc.none { background: linear-gradient(135deg, #fff 45%, #c62828 45% 55%, #fff 55%); }
.pe-colin { width: 30px; height: 26px; min-height: 0; padding: 0 2px; border-radius: 6px; cursor: pointer; }
.pe-range { display: flex; align-items: center; gap: 8px; width: 100%; }
.pe-range input { flex: 1; min-width: 0; accent-color: var(--blue-fill); }
.pe-val { min-width: 48px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pe-num { display: inline-flex; align-items: center; gap: 4px; }
.pe-num input { width: 76px; min-height: 32px; }
.pe-tog { min-width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.pe-tog-g { font-weight: 800; }
.pe-tog-i { font-style: italic; font-family: Georgia, serif; }
.pe-tog[aria-pressed=true] { background: var(--press); border-color: var(--press); color: #fff; }
.pe-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; cursor: pointer; }
.pe-chk input { width: auto; min-height: 0; margin-top: 2px; flex: 0 0 auto; }
.pe-chk small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pe-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.pe-acts .btn-sm { gap: 5px; }
.pe-acts .pe-ic { width: 15px; height: 15px; }
.btn-danger-ghost { color: var(--danger); }
.pe-size { font-size: 12px; }
.pe-pageinfo { display: grid; gap: 3px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.pe-fgroup { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.pe-frow { display: grid; gap: 3px; font-size: 13px; }
.pe-frow input[type=text], .pe-frow textarea, .pe-frow select { width: 100%; }
.pe-srch { display: flex; gap: 6px; }
.pe-srch input { flex: 1; min-width: 0; }
.pe-srch-nav { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pe-srch-nav span { flex: 1; }
.pe-srch-nav .pe-ic { width: 15px; height: 15px; }
.pe-hits { display: grid; gap: 2px; max-height: 340px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px; }
.pe-hitrow { display: flex; gap: 8px; padding: 5px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pe-hitrow:hover, .pe-hitrow.cur { background: var(--tint-blue); }
.pe-hitrow .muted { flex: 0 0 auto; }
.pe-start { position: absolute; inset: 0; z-index: 4; display: none; place-items: center; padding: 20px; overflow-y: auto; background: var(--surface); }
.pe-nodoc .pe-start { display: grid; }
.pe-nodoc .pe-tools, .pe-nodoc .pe-bar-r > :not(.pe-savebtn) { visibility: hidden; }
.pe-start-card { max-width: 680px; text-align: center; }
.pe-start-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--tint-blue); color: var(--blue); }
.pe-start-ico .pe-ic { width: 34px; height: 34px; }
.pe-start-card h2 { margin: 12px 0 6px; font-size: 24px; }
.pe-start-card > p { margin: 0 auto 20px; max-width: 560px; line-height: 1.5; }
.pe-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pe-start-btn { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.pe-start-btn:hover { border-color: var(--blue); }
.pe-start-btn .pe-ic { width: 26px; height: 26px; color: var(--blue); }
.pe-start-btn strong { font-size: 14px; }
.pe-start-btn span { font-size: 12px; color: var(--muted); }
.pe-start-btn.primary { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.pe-start-btn.primary .pe-ic, .pe-start-btn.primary span { color: #fff; }
.pe-drop::after { content: "Déposez vos PDF ou images ici"; position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; border: 3px dashed var(--signal); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink); font-size: 18px; font-weight: 700; pointer-events: none; }
.pe-busy { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); font-weight: 600; }
.pe-busy[hidden] { display: none; }
.pe-spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--signal); border-radius: 50%; animation: pe-spin .8s linear infinite; }
@keyframes pe-spin { to { transform: rotate(360deg); } }
.pe-menu { position: fixed; z-index: 1200; width: 300px; max-width: calc(100vw - 16px); overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(10, 20, 40, .22); }
.pe-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.pe-menu button:hover:not(:disabled) { background: var(--line-2); }
.pe-menu button:disabled { opacity: .4; cursor: default; }
.pe-menu button span:nth-child(2) { flex: 1; }
.pe-menu .pe-ic { width: 17px; height: 17px; color: var(--ink-3); }
.pe-menu kbd { font: 11px var(--f-body); color: var(--muted); }
.pe-menu-sep { height: 1px; margin: 4px 6px; background: var(--line-2); }
.pe-sig { display: grid; gap: 10px; }
.pe-sigpad { width: 100%; height: 210px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.pe-sig-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe-sig-opts input[type=range] { width: 110px; }
.pe-sig-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-sig-item { display: flex; align-items: center; gap: 2px; }
.pe-sig-use { display: grid; place-items: center; width: 130px; height: 56px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.pe-sig-use:hover { border-color: var(--blue); }
.pe-sig-use img { max-width: 100%; max-height: 100%; }
.pe-hf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pe-hf-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pe-hf-opts input[type=color] { width: 100%; min-height: 36px; padding: 2px; }
.pe-save .pe-chk { font-size: 14px; }
@media (max-width: 1100px) {
  .pe-body { grid-template-columns: 150px minmax(0, 1fr) 250px; }
  .pe-noside .pe-body { grid-template-columns: 0 minmax(0, 1fr) 250px; }
  .pe-noprops .pe-body { grid-template-columns: 150px minmax(0, 1fr) 0; }
  .pe-tool > span:not(.pe-ic) { display: none; }
  .pe-tool { min-width: 38px; }
  .pe-title { max-width: 180px; }
}
@media (max-width: 860px) {
  .main.pe-fill { height: calc(100dvh - 62px - var(--safe-b)); }
  .pe-host { padding: 0; }
  .pe { border-radius: 0; border-left: 0; border-right: 0; }
  .pe-body, .pe-noside .pe-body, .pe-noprops .pe-body, .pe-noside.pe-noprops .pe-body { grid-template-columns: minmax(0, 1fr); }
  .pe-side { position: absolute; z-index: 8; top: 0; bottom: 0; left: 0; width: 168px; box-shadow: 4px 0 16px rgba(0, 0, 0, .2); }
  .pe-grid .pe-side { width: 100%; }
  .pe-body { position: relative; }
  .pe-props { position: absolute; z-index: 9; left: 0; right: 0; bottom: 0; max-height: 58%; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .2); }
  .pe-props-x { display: inline-grid; }
  .pe-mbtn > span:not(.pe-ic), .pe-savebtn > span:not(.pe-ic) { display: none; }
  .pe-bar { padding: 4px 6px; }
  .pe-bar .pe-tb { width: 32px; height: 32px; }
  .pe-title { display: none; }
  .pe-bar .pe-sep { display: none; }
  .pe-pagebox { display: none; }
  .pe-hf { grid-template-columns: 1fr; }
}.pe-head { padding: 8px 14px 8px; gap: 10px; }
.pe-head h1 { font-size: 20px; margin-right: auto; padding-bottom: 0; }
.pe-head h1::after { display: none; }
.pe-head .btn svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .pe-head { padding: 6px 10px; } .pe-head h1 { font-size: 17px; } }/* champs de l'éditeur PDF : prioritaires sur le style général des champs (input:not(...)) */
.pe .pe-bar input.pe-pagein { width: 44px; min-height: 30px; padding: 0 4px; text-align: center; font-size: 13px; }
.pe .pe-num input[type=number] { width: 76px; min-height: 32px; padding: 4px 6px; font-size: 13.5px; }
.pe .pe-range input[type=range] { min-height: 0; padding: 0; border: 0; background: none; }
.pe-sig .pe-sig-opts input[type=range] { width: 120px; min-height: 0; padding: 0; border: 0; background: none; }
.pe .pe-form input.pe-field, .pe .pe-form select.pe-field, .pe .pe-form textarea.pe-field { min-height: 0; padding: 0 2px; border-radius: 2px; border: 1px solid rgba(31, 111, 178, .45); background: rgba(220, 234, 252, .82); }
.pe .pe-form input.pe-field:focus, .pe .pe-form textarea.pe-field:focus { background: #fff; }
.pe .pe-props-body input:not([type=checkbox]):not([type=radio]):not([type=color]), .pe .pe-props-body select { min-height: 34px; padding: 5px 8px; font-size: 13.5px; }
/* ================================================================ Instantanés (1.04.0) : planning de pose et prévisionnel */
.snap-intro { margin: 0 0 12px; }
.snap-take { display: flex; gap: 8px; margin-bottom: 14px; }
.snap-take input { flex: 1; min-width: 0; }
.snap-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.snap-period { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; font-size: 13px; }
.snap-period input { width: auto; min-width: 0; margin: 0; }
.snap-list { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.snap-day { position: sticky; top: 0; z-index: 1; background: var(--surface-2); padding: 4px 12px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.snap-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.snap-row:last-child { border-bottom: 0; }
.snap-row:hover { background: var(--surface-2); }
.snap-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.snap-tag { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 8px; background: var(--paper); color: var(--muted); border: 1px solid var(--line-2); }
.snap-tag.same { background: var(--tint-green); color: var(--ok); border-color: transparent; }
.snap-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.snap-vs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; font-size: 14px; }
.snap-arrow { color: var(--muted); }
.snap-sum { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.snap-chip { font-size: 13px; padding: 2px 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-2); }
.snap-chip.add { background: var(--tint-green); border-color: transparent; color: var(--ok); }
.snap-chip.del { background: var(--tint-red); border-color: transparent; color: var(--danger); }
.snap-chip.chg { background: var(--tint-yellow); border-color: transparent; }
.snap-res { max-height: 62vh; overflow: auto; }
.snap-sec { margin-bottom: 10px; }
.snap-sec > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 0; }
.snap-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.snap-sec.add .snap-dot { background: var(--ok); }
.snap-sec.del .snap-dot { background: var(--danger); }
.snap-sec.chg .snap-dot { background: #f5b800; }
.snap-items { display: flex; flex-direction: column; gap: 4px; }
.snap-item { display: grid; grid-template-columns: 190px minmax(0, 1.4fr) minmax(0, 1fr); gap: 4px 12px; padding: 6px 10px; border-left: 4px solid var(--c); border-radius: 4px; background: var(--surface-2); font-size: 13px; }
.snap-sec.del .snap-item { opacity: .8; }
.snap-sec.del .snap-what strong { text-decoration: line-through; }
.snap-what { display: flex; flex-direction: column; min-width: 0; }
.snap-what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snap-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.snap-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.snap-field { font-size: 12px; }
.snap-field s { color: var(--muted); }
.snap-proj { border-left: 4px solid var(--c); border-radius: 4px; background: var(--surface-2); padding: 6px 10px; }
.snap-proj > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.snap-days { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0 2px; }
.snap-delta { font-weight: 700; }
.snap-delta.up { color: var(--ok); }
.snap-delta.down { color: var(--danger); }
@media (max-width: 860px) {
  .snap-row { grid-template-columns: auto minmax(0, 1fr); }
  .snap-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .snap-item { grid-template-columns: minmax(0, 1fr); }
  .snap-take { flex-direction: column; }
}
/* ================================================================ Ordre des ressources par glisser-déposer (1.05.0) */
.res-drag { cursor: grab; }
.res-drag.res-dragging { opacity: .45; }
.res-grip { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; line-height: 1; visibility: hidden; pointer-events: none; }
.res-drag:hover .res-grip { visibility: visible; }
.tl-label.res-drop-before { box-shadow: inset 0 3px 0 var(--signal); }
.tl-label.res-drop-after { box-shadow: inset 0 -3px 0 var(--signal); }
.tp-colhead.res-drop-before { box-shadow: inset 3px 0 0 var(--signal); }
.tp-colhead.res-drop-after { box-shadow: inset -3px 0 0 var(--signal); }
.res-order { max-height: 60vh; overflow: auto; }
.res-order-row { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 6px; }
.res-order-row:hover { background: var(--surface-2); }
.res-order-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-order-row .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
@media (hover: none) { .res-grip { display: none; } }
/* ================================================================ Secteur, ressources masquées, Planning atelier (1.06.0) */
/* secteur au-dessus du nom de l'équipe (ligne ou en-tête de colonne) */
.res-sector { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 700; line-height: 15px;
  padding: 0 6px; border-radius: 8px; margin-bottom: 1px; text-transform: uppercase; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-3); }
.res-sector.sector-travaux { background: var(--tint-orange); color: var(--ink-orange); }
.res-sector.sector-service { background: var(--tint-blue); color: var(--blue-dark); }
.board[data-density="max"] .res-sector { font-size: 9.5px; line-height: 13px; padding: 0 4px; }
/* bouton « masquer » (œil barré) : au survol du nom */
.res-hide { position: absolute; right: 2px; top: 2px; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: var(--surface); color: var(--muted); cursor: pointer; visibility: hidden; }
.res-hide svg { width: 14px; height: 14px; }
.res-hide:hover { color: var(--danger); background: var(--surface-2); }
.res-drag:hover .res-hide, .res-hide:focus-visible { visibility: visible; }
.tp-colhead { position: sticky; }
@media (hover: none) { .res-hide { visibility: visible; opacity: .55; } }
/* bandeau des ressources masquées */
.hidden-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 10px; margin: 0 0 6px; border: 1px dashed var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-size: 13px; color: var(--ink-2); }
.hidden-note svg { width: 16px; height: 16px; color: var(--muted); }
.hidden-chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 12.5px; }
.hidden-chip:hover { border-color: var(--signal); }
.hidden-chip .dot { width: 8px; height: 8px; border-radius: 2px; }
.res-vis { font-size: 12.5px; font-weight: 400; min-height: 0; color: var(--ink-2); white-space: nowrap; }
/* Planning atelier : repère dans la barre du planning et dans la liste des ressources */
.board-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; background: var(--chrome-2); color: #fff; font-weight: 700; font-size: 13px; }
.board-badge svg { width: 15px; height: 15px; }
.board-chip { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 8px; font-size: 11px; font-weight: 700; background: var(--chrome-2); color: #fff; vertical-align: 1px; }/* poignée de glisser-déposer en bas à droite (le bouton « masquer » occupe le haut) */
.tl-label .res-grip, .tp-colhead .res-grip { top: auto; bottom: 3px; transform: none; }

/* ================================================================ Planning BE et Planning général (1.12.0) */
.board-badge.board-be, .board-chip.board-be { background: #1f6fb2; }
.gen { --gen-l: 330px; display: flex; flex-direction: column; gap: 14px; }
.gen-sub { font-size: 14px; font-weight: 500; }
.gen-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.gen-tools .spacer { flex: 1; }
.gen-nav { display: flex; align-items: center; gap: 4px; }
.gen-period { margin-left: 8px; font-size: 15px; text-transform: capitalize; white-space: nowrap; }
.gen-tools .gen-q { width: 280px; max-width: 100%; min-height: 36px; border-radius: 18px !important; padding-left: 14px !important; }
.gen-legend { display: flex; gap: 6px; }
.gen-tools .gen-sort { width: auto; min-height: 36px; }
.gen-leg { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gen-leg svg { width: 15px; height: 15px; color: var(--pc); }
.gen-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--pc); }
.gen-leg[aria-pressed="false"] { opacity: .5; background: transparent; text-decoration: line-through; }
.gen-leg[aria-pressed="false"] i { background: transparent; border: 2px solid var(--pc); }

/* chiffres */
.gen-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.gen-kpi { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.gen-kpi.ph { border-top: 4px solid var(--pc); background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 8%, var(--surface)), var(--surface) 70%); }
.gen-kpi-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--pc); text-transform: uppercase; letter-spacing: .04em; }
.gen-kpi-h svg { width: 16px; height: 16px; }
.gen-kpi-v { font: 800 26px/1.15 var(--f-head, inherit); color: var(--ink); }
.gen-kpi-v small { font-size: 14px; font-weight: 600; color: var(--muted); }
.gen-kpi-l { font-size: 13px; color: var(--muted); }

/* frise */
.gen-wrap { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; overflow-x: auto; overflow-y: visible; }
.gen-wrap.loading { opacity: .55; transition: opacity .2s; }
.gen-board { min-width: 860px; }
.gen-row { display: grid; grid-template-columns: var(--gen-l) 1fr; border-bottom: 1px solid var(--line-2); }
.gen-rows > .gen-row { cursor: pointer; transition: background .12s; }
.gen-rows > .gen-row:hover, .gen-rows > .gen-row:focus-visible { background: color-mix(in srgb, var(--signal) 5%, transparent); outline: none; }
.gen-rows > .gen-row:focus-visible { box-shadow: inset 3px 0 0 var(--signal); }
.gen-rows > .gen-row:last-child { border-bottom: 0; }
.gen-hrow { position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-radius: 14px 14px 0 0; }
.gen-lcol { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-width: 0; border-right: 1px solid var(--line-2); background: var(--surface); position: sticky; left: 0; z-index: 2; }
.gen-hrow .gen-lcol { background: var(--surface-2); border-radius: 14px 0 0 0; }
.gen-tl { position: relative; min-width: 0; }
.gen-months { height: 46px; }
.gen-month { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: capitalize; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.gen-month:first-child { border-left: 0; }
.gen-month.cur { color: var(--signal); }
.gen-today-l { position: absolute; bottom: -1px; transform: translateX(-50%); padding: 1px 7px; border-radius: 8px 8px 0 0; background: var(--signal); color: #fff; font-size: 10.5px; font-weight: 800; white-space: nowrap; z-index: 1; }
.gen-rows { position: relative; }
.gen-grid { position: absolute; top: 0; bottom: 0; left: var(--gen-l); right: 0; pointer-events: none; z-index: 0; }
.gen-grid i, .gen-mini-grid i { position: absolute; top: 0; bottom: 0; width: 0; }
.gen-wk { border-left: 1px dashed var(--line-2); }
.gen-ml { border-left: 1px solid var(--line); }
.gen-today { border-left: 2px solid var(--signal); z-index: 1; }
.gen-today::before { content: ''; position: absolute; top: -1px; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }

/* colonne des affaires */
.gen-pn { min-width: 0; display: grid; gap: 5px; flex: 1; }
.gen-pt { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; }
.gen-pt strong { white-space: nowrap; }
.gen-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2, var(--ink)); }
.gen-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.gen-steps { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gen-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 10px; font-size: 11px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--pc) 45%, transparent); color: var(--pc); background: var(--surface); }
.gen-chip i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--pc); }
.gen-chip svg { width: 11px; height: 11px; stroke-width: 3; }
.gen-chip.st-none { opacity: .35; border-style: dashed; color: var(--muted); border-color: var(--line); }
.gen-chip.st-none i { border-color: var(--muted); }
.gen-chip.st-run { background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.gen-chip.st-run i { background: var(--pc); animation: genPulse 1.8s ease-in-out infinite; }
.gen-chip.st-done { background: var(--pc); color: #fff; border-color: var(--pc); }
@keyframes genPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pc) 55%, transparent); } 50% { box-shadow: 0 0 0 4px transparent; } }
.gen-next { margin-left: 4px; font-size: 11.5px; font-weight: 700; color: var(--pc); white-space: nowrap; }
.gen-next.st-todo { color: var(--muted); }
.gen-next.st-todo::before { content: '→ '; }
.gen-next.big { margin: 0; font-size: 17px; }

/* anneau d'avancement */
.gen-ring { --p: 0; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--signal) calc(var(--p) * 1%), var(--line-2) 0); }
.gen-ring span { width: 31px; height: 31px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--ink); }
.gen-ring.big { width: 84px; height: 84px; }
.gen-ring.big span { width: 66px; height: 66px; font-size: 19px; }

/* pistes et barres */
.gen-lanes { display: grid; grid-template-rows: repeat(var(--lanes, 3), 1fr); gap: 4px; padding: 9px 0; z-index: 1; }
.gen-lane { position: relative; height: 16px; border-radius: 8px; }
.gen-lane::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dotted color-mix(in srgb, var(--pc) 30%, transparent); }
.gen-lane.empty::before { border-top-color: var(--line-2); }
.gen-bar { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, var(--pc) var(--p, 0%), color-mix(in srgb, var(--pc) 28%, var(--surface)) var(--p, 0%));
  box-shadow: inset 0 0 0 1.5px var(--pc); transition: transform .12s, box-shadow .12s; }
.gen-bar.done { background: var(--pc); opacity: .55; }
.gen-bar.run { box-shadow: inset 0 0 0 1.5px var(--pc), 0 0 0 3px color-mix(in srgb, var(--pc) 22%, transparent); }
.gen-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gen-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.gen-bar span { font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 0 3px color-mix(in srgb, var(--pc) 80%, #000); white-space: nowrap; pointer-events: none; }
.gen-row:hover .gen-bar { transform: scaleY(1.12); }

/* fiche d'une affaire */
.gen-detail { display: grid; gap: 18px; }
.gen-dtop { display: flex; align-items: center; gap: 18px; }
.gen-dfacts { display: grid; gap: 8px; min-width: 0; }
.gen-factrow { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.gen-fact { display: grid; }
.gen-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: none; }
.gen-step { position: relative; display: flex; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.gen-step:not(:last-child)::after { content: '›'; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 800; color: var(--line); z-index: 1; }
.gen-step.st-run { border-color: var(--pc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 15%, transparent); }
.gen-step.st-done { background: color-mix(in srgb, var(--pc) 7%, var(--surface)); }
.gen-step.st-none { opacity: .6; border-style: dashed; }
.gen-step-ico { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: var(--pc); }
.gen-step.st-done .gen-step-ico { background: var(--pc); color: #fff; }
.gen-step-ico svg { width: 21px; height: 21px; }
.gen-step-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.gen-step-st { font-size: 13px; font-weight: 800; color: var(--pc); }
.gen-step.st-none .gen-step-st { color: var(--muted); }
.gen-step-bar { height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.gen-step-bar i { display: block; height: 100%; background: var(--pc); border-radius: 4px; }
.gen-mini { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px 12px; background: var(--surface-2); }
.gen-mini-scale { position: relative; display: flex; justify-content: space-between; margin-left: 64px; height: 18px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.gen-mini-tick { position: absolute; top: 0; transform: translateX(-50%); text-transform: capitalize; }
.gen-mini-lanes { position: relative; display: grid; gap: 6px; padding-top: 4px; }
.gen-mini-grid { position: absolute; top: 0; bottom: 0; left: 64px; right: 0; pointer-events: none; }
.gen-mini-lane { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; }
.gen-mini-l { font-size: 12px; font-weight: 800; }
.gen-list { border: 1px solid var(--line-2); border-left: 4px solid var(--pc); border-radius: 10px; background: var(--surface); }
.gen-list summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.gen-list summary svg { width: 17px; height: 17px; color: var(--pc); }
.gen-tasks { display: grid; padding: 0 12px 10px; }
.gen-task { display: grid; grid-template-columns: 170px 170px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.gen-task.past { color: var(--muted); }
.gen-task-r { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-task-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-task-s { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.gen-task-s::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.gen-go { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-go svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  .gen { --gen-l: 210px; }
  .gen-tools .gen-q { width: 100%; }
  .gen-nav { flex-wrap: wrap; }
  .gen-period { white-space: normal; font-size: 14px; }
  .gen-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gen-kpi { padding: 9px 12px; }
  .gen-kpi-v { font-size: 21px; }
  .gen-kpi-h { font-size: 11px; }
  .gen-tools .spacer { display: none; }
  .gen-ring:not(.big) { display: none; }
  .gen-board { min-width: 720px; }
  .gen-stepper { grid-template-columns: 1fr; }
  .gen-step:not(:last-child)::after { content: '⌄'; right: auto; left: 50%; top: auto; bottom: -16px; transform: translateX(-50%); }
  .gen-task { grid-template-columns: 1fr auto; }
  .gen-task-t { grid-column: 1 / -1; }
  .gen-dtop { align-items: flex-start; }
  .gen-ring.big { width: 64px; height: 64px; }
  .gen-ring.big span { width: 50px; height: 50px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .gen-chip.st-run i { animation: none; } .gen-row:hover .gen-bar { transform: none; } }

/* ================================================================ Ressources : secteurs modifiables, sélection (1.13.0) */
.sector { background: var(--surface-2); color: var(--ink-2, var(--ink)); }
.sector.sector-travaux { background: var(--tint-orange); color: var(--ink-orange); }
.sector.sector-service { background: var(--tint-blue); color: var(--blue-dark); }
.sector-metallerie, .res-sector.sector-metallerie { background: color-mix(in srgb, #55636f 16%, var(--surface)); color: #3f4b56; }
.sector-alu, .res-sector.sector-alu { background: color-mix(in srgb, #2a7f8f 15%, var(--surface)); color: #1f6573; }
.sector-calculateur, .res-sector.sector-calculateur { background: color-mix(in srgb, #7a5bb5 15%, var(--surface)); color: #5d4392; }
:root[data-theme="dark"] .sector-metallerie, :root[data-theme="dark"] .sector-alu, :root[data-theme="dark"] .sector-calculateur { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .sector-metallerie, :root[data-theme="auto"] .sector-alu, :root[data-theme="auto"] .sector-calculateur { color: var(--ink); } }
.sector-pick { display: flex; gap: 6px; align-items: center; }
.sector-pick select { flex: 1; min-width: 0; }
.sec-list { display: grid; gap: 6px; margin-bottom: 12px; }
.sec-row { display: flex; align-items: center; gap: 8px; }
.sec-row input { flex: 1; min-width: 0; }
.sec-row.base { padding: 6px 2px; }
.sec-add { display: flex; gap: 8px; }
.sec-add input { flex: 1; min-width: 0; }
.res-selbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--tint-blue); border: 1px solid color-mix(in srgb, var(--signal) 30%, transparent); }
.res-selbar .spacer { flex: 1; }
.res-selbar svg { width: 15px; height: 15px; }
.res-list .res-ck { width: 34px; text-align: center; }
.res-list tr.selected td { background: color-mix(in srgb, var(--signal) 6%, transparent); }
.res-acts { white-space: nowrap; }
.res-acts .btn + .btn { margin-left: 4px; }
/* ================================================================ Personnes en lot, import, secteurs (1.14.0) */
.res-secf { width: auto; min-height: 38px; }
.res-selg { display: inline-flex; align-items: center; gap: 6px; }
.res-selg select { width: auto; min-height: 30px; max-width: 220px; }
.sec-row .sector { min-width: 22px; text-align: center; padding: 1px 6px; }
.sec-n { min-width: 64px; text-align: right; }
.imp-paste { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.imp-out { display: grid; gap: 8px; margin-top: 12px; }
.imp-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.imp-sec { border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 12px; }
.imp-sec summary { cursor: pointer; }
.imp-sec ul { margin: 6px 0; padding-left: 18px; font-size: 13px; max-height: 240px; overflow: auto; }
.imp-sec.err { border-color: color-mix(in srgb, #c8382e 40%, transparent); }
.imp-sec.warn { border-color: color-mix(in srgb, #c47a1c 40%, transparent); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--signal); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-align: left; }

/* ================================================================ Insider (1.14.0) */
.ins-chip { display: inline-flex; align-items: center; padding: 1px 8px; margin-left: 6px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(90deg, #F7C948, #E75200); color: #fff; vertical-align: 1px; }
.ins-chip.big { font-size: 12px; padding: 3px 10px; margin-left: 0; }
.ins { display: flex; flex-direction: column; gap: 14px; }
.ins-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 20px 22px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(247, 201, 72, .35), transparent 55%), linear-gradient(120deg, #2A3651, #3a4866 60%, #E75200 160%); }
.ins-hero-t { flex: 1 1 380px; min-width: 0; }
.ins-hero h2 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.ins-hero p { margin: 0; opacity: .9; line-height: 1.5; }
.ins-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.ins-stat { display: grid; justify-items: center; min-width: 78px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.ins-stat strong { font: 800 22px/1.1 var(--f-head, inherit); }
.ins-stat span { font-size: 12px; opacity: .85; }
.ins-tabs { align-self: flex-start; }
.ins-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ins-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 4px; }
.ins-tools .ins-q { flex: 1 1 260px; min-height: 38px; }
.ins-tools select { width: auto; min-height: 38px; }
.ins-count { margin: 4px 0 8px; }
.ins-list { display: grid; gap: 10px; }
.ins-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ins-card:hover, .ins-card:focus-visible { border-color: color-mix(in srgb, var(--signal) 45%, var(--line-2)); box-shadow: 0 6px 18px rgba(42, 54, 81, .08); outline: none; }
.ins-card.pinned { border-left: 4px solid #F2B705; }
.ins-card-b { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ins-card-h { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.ins-card-h strong { min-width: 0; overflow-wrap: anywhere; }
.ins-ex { margin: 0; color: var(--ink-2, var(--ink)); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ins-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: var(--muted); }
.ins-by { display: inline-flex; align-items: center; gap: 6px; }
.ins-by .fd-avatar { width: 22px; height: 22px; font-size: 9px; }
.ins-cat { padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2, var(--ink)); font-size: 12px; font-weight: 600; }
.ins-ver { padding: 1px 7px; border-radius: 8px; background: color-mix(in srgb, #2e8b6e 15%, var(--surface)); color: #23715a; font-size: 12px; font-weight: 700; }
.ins-ans { color: #23715a; font-weight: 700; }
.ins-st { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2, var(--ink)); }
.ins-st.st-nouvelle { background: color-mix(in srgb, #55636f 14%, var(--surface)); }
.ins-st.st-etude { background: color-mix(in srgb, #7a5bb5 16%, var(--surface)); color: #5d4392; }
.ins-st.st-planifiee { background: color-mix(in srgb, #1f6fb2 16%, var(--surface)); color: #1a5d96; }
.ins-st.st-en_cours { background: color-mix(in srgb, #E75200 16%, var(--surface)); color: #b84200; }
.ins-st.st-livree { background: color-mix(in srgb, #2e8b6e 18%, var(--surface)); color: #23715a; }
.ins-st.st-refusee { background: color-mix(in srgb, #c8382e 14%, var(--surface)); color: #a52d25; }
.ins-st.st-doublon { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
:root[data-theme="dark"] .ins-st, :root[data-theme="dark"] .ins-ver, :root[data-theme="dark"] .ins-ans { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .ins-st, :root[data-theme="auto"] .ins-ver, :root[data-theme="auto"] .ins-ans { color: var(--ink); } }
.ins-vote { flex: none; display: grid; justify-items: center; align-content: center; gap: 0; width: 54px; min-height: 58px; padding: 4px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; transition: background .15s, border-color .15s, transform .1s; }
.ins-vote svg { width: 18px; height: 18px; stroke-width: 2.6; }
.ins-vote strong { font: 800 17px/1.1 var(--f-head, inherit); }
.ins-vote:hover:not(:disabled) { border-color: var(--signal); color: var(--signal); }
.ins-vote:active:not(:disabled) { transform: scale(.95); }
.ins-vote.on { background: var(--signal); border-color: var(--signal); color: #fff; }
.ins-vote:disabled { opacity: .55; cursor: default; }
.ins-vote.big { width: 100%; min-height: 76px; grid-auto-flow: column; justify-content: center; gap: 10px; }
.ins-vote.big strong { font-size: 26px; }
.ins-vote.big span { font-size: 14px; font-weight: 700; }
.ins-empty { padding: 40px 20px; }
.ins-empty-ico { font-size: 44px; }

.ins-road { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ins-col { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); border-top: 4px solid var(--line); min-width: 0; }
.ins-col.st-etude { border-top-color: #7a5bb5; } .ins-col.st-planifiee { border-top-color: #1f6fb2; } .ins-col.st-en_cours { border-top-color: #E75200; } .ins-col.st-livree { border-top-color: #2e8b6e; }
.ins-col-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ins-col-h .muted { flex: 1 1 100%; }
.ins-col-n { margin-left: auto; font-weight: 800; color: var(--muted); }
.ins-col-h .muted.small { order: 3; }
.ins-rc { display: grid; gap: 6px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ins-rc:hover { border-color: var(--signal); }
.ins-rc-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.ins-col-e { padding: 8px 2px; }
.ins-rel { display: grid; gap: 8px; }
.ins-rel h3 { margin: 6px 0 0; }
.ins-rel-list { display: grid; gap: 6px; }
.ins-rel-it { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ins-rel-ok { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #2e8b6e; color: #fff; font-weight: 800; }
.ins-rel-t { display: grid; gap: 2px; min-width: 0; }
.ins-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ins-mem { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.ins-mem-t { display: grid; gap: 3px; min-width: 0; }

.ins-modal .modal-body { padding-top: 6px; }
.ins-detail { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.ins-d-main { display: grid; gap: 14px; min-width: 0; }
.ins-d-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ins-kind-l { font-weight: 700; }
.ins-text p { margin: 0 0 10px; line-height: 1.55; overflow-wrap: anywhere; }
.ins-text p:last-child { margin-bottom: 0; }
.ins-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ins-img { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 4 / 3; background: var(--surface-2); }
.ins-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ins-img:hover img { transform: scale(1.04); }
.ins-answer { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #2e8b6e 9%, var(--surface)); border-left: 4px solid #2e8b6e; }
.ins-answer-h { font-weight: 800; margin-bottom: 6px; }
.ins-dups { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.ins-mod { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 14px; background: var(--surface-2); }
.ins-mod summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.ins-mod-a { display: flex; justify-content: flex-end; margin-top: 8px; }
.ins-mod-m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.ins-mod-m select { flex: 1 1 240px; width: auto; }
.ins-th { margin: 6px 0 0; font-size: 16px; }
.ins-thread { display: grid; gap: 10px; }
.ins-com { display: flex; gap: 10px; }
.ins-com-b { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.ins-com-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 4px; }
.ins-com-a { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.ins-com:hover .ins-com-a, .ins-com:focus-within .ins-com-a { opacity: 1; }
.ins-com-edit { display: grid; gap: 6px; }
.ins-ev { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 2px 4px; color: var(--ink-2, var(--ink)); }
.ins-ev-i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.ins-reply { display: grid; gap: 6px; }
.ins-reply textarea { width: 100%; }
.ins-reply-a { display: flex; justify-content: flex-end; }
.ins-d-side { position: sticky; top: 0; display: grid; gap: 10px; }
.ins-voters { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ins-voters .fd-avatar { width: 28px; height: 28px; font-size: 10px; }
.ins-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.ins-facts dt { color: var(--muted); }
.ins-facts dd { margin: 0; }
.ins-who { display: inline-flex; align-items: center; gap: 6px; }
.ins-who .fd-avatar { width: 24px; height: 24px; font-size: 9px; }
.ins-own { display: flex; flex-wrap: wrap; gap: 6px; }

.ins-form { display: grid; gap: 12px; }
.ins-f-l { font-size: 13px; font-weight: 600; color: var(--ink-2, var(--ink)); margin-bottom: -6px; }
.ins-kpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ins-kopt { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ins-kopt.on { border-color: var(--signal); background: var(--tint-blue); }
.ins-kopt-i { font-size: 20px; }
.ins-sim { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--tint-blue); }
.ins-sim-it { display: flex; align-items: center; gap: 10px; }
.ins-sim-it .ins-vote { width: 44px; min-height: 44px; }
.ins-sim-it .ins-vote strong { font-size: 14px; }
.ins-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.ins-thumb { position: relative; width: 104px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); }
.ins-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ins-thumb-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; line-height: 1; }
.ins-thumb.add { display: grid; place-content: center; justify-items: center; border-style: dashed; cursor: pointer; color: var(--muted); font-size: 20px; }
.ins-thumb.add span { font-size: 12px; }
@media (max-width: 900px) {
  .ins-detail { grid-template-columns: 1fr; }
  .ins-d-side { position: static; order: -1; }
  .ins-kpick { grid-template-columns: 1fr; }
  .ins-road { grid-template-columns: repeat(4, 78vw); }
  .ins-card { padding: 12px; gap: 10px; }
  .ins-hero { padding: 16px; }
  .ins-tools .ins-q { flex-basis: 100%; }
}
/* ------------------------------------------------------------ Hubie (1.15.0) : bulle d'aide en bas à droite */
.hb-root { position: fixed; right: 20px; bottom: calc(20px + var(--safe-b)); z-index: 850; }
/* clavier ouvert sur une autre page : la bulle s'efface ; fenêtre de Hubie ouverte : elle reste (on tape dedans) */
.auth-page .hb-root, body.fm-filling .hb-root, body.kb-open .hb-root:not(.hb-open) { display: none; }
.hb-fab-wrap { position: relative; }
.hb-fab { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--surface); padding: 0; cursor: pointer; background: var(--signal);
  box-shadow: 0 8px 24px rgba(42,54,81,.32); transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; display: block; }
.hb-fab img { width: 100%; height: 100%; display: block; }
.hb-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(42,54,81,.38); }
.hb-fab:focus-visible, .hb-tab:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hb-fab-x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 4px; cursor: pointer;
  background: var(--chrome); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.hb-fab-x svg { width: 12px; height: 12px; }
.hb-fab-wrap:hover .hb-fab-x, .hb-fab-x:focus-visible { opacity: 1; }
@media (hover: none) { .hb-fab-x { opacity: .85; } }
/* languette du bord droit : bulle masquée, ou pages où la saisie est en bas à droite */
.hb-tab { display: none; position: fixed; right: 0; bottom: calc(132px + var(--safe-b)); width: 34px; height: 46px; padding: 4px 0 4px 5px; border: 0; cursor: pointer;
  border-radius: 23px 0 0 23px; background: var(--chrome); box-shadow: -2px 4px 14px rgba(42,54,81,.3); transition: width .15s; }
.hb-tab img { width: 38px; height: 38px; border-radius: 50%; display: block; }
.hb-tab:hover { width: 48px; }
.hb-root.hb-hidden .hb-fab-wrap, .hb-root.hb-compact .hb-fab-wrap { display: none; }
.hb-root.hb-hidden .hb-tab, .hb-root.hb-compact .hb-tab { display: block; }
.hb-root.hb-open .hb-fab-wrap, .hb-root.hb-open .hb-tab { display: none; }
.hb-root.hb-hidden.hb-open .hb-tab { display: none; }

.hb-panel { position: fixed; right: 20px; bottom: calc(20px + var(--safe-b)); width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 22px 60px rgba(42,54,81,.32); animation: hb-in .18s ease-out; }
.hb-panel[hidden] { display: none; }
@keyframes hb-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.hb-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--chrome); color: #fff; }
.hb-avatar { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); flex: none; }
.hb-title { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.hb-title strong { font-size: 16px; }
.hb-title span { font-size: 12.5px; color: #c9d2de; }
.hb-ico { border: 0; background: transparent; color: #fff; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 18px; display: grid; place-items: center; flex: none; }
.hb-ico svg { width: 18px; height: 18px; }
.hb-ico:hover { background: rgba(255,255,255,.12); }
.hb-menu { position: absolute; top: 52px; right: 10px; z-index: 2; display: grid; min-width: 210px; padding: 6px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 14px 40px rgba(42,54,81,.22); }
.hb-menu[hidden] { display: none; }
.hb-menu button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.hb-menu button:hover { background: var(--line-2); }
.hb-menu svg { width: 16px; height: 16px; }
.hb-list { flex: 1; overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); overscroll-behavior: contain; }
.hb-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.hb-msg.user { justify-content: flex-end; }
.hb-mini { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.hb-bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.hb-msg.bot .hb-bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }
.hb-msg.user .hb-bubble { background: var(--blue-fill); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.hb-text > :first-child { margin-top: 0; }
.hb-text > :last-child { margin-bottom: 0; }
.hb-text p { margin: 0 0 6px; }
.hb-text ol, .hb-text ul { margin: 4px 0 6px; padding-left: 20px; }
.hb-text li { margin: 2px 0; }
.hb-text a { color: var(--blue); font-weight: 600; }
.hb-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; }
.hb-rates { display: flex; gap: 4px; margin-top: 6px; }
.hb-rate { border: 1px solid transparent; background: none; border-radius: 6px; padding: 1px 6px; cursor: pointer; font-size: 13px; opacity: .55; }
.hb-rate:hover, .hb-rate[aria-pressed=true] { opacity: 1; border-color: var(--line); background: var(--surface-2); }
.hb-typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; border-bottom-left-radius: 4px; }
.hb-list > .hb-typing { align-self: center; }
.hb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: hb-dot 1s infinite ease-in-out; }
.hb-typing span:nth-child(2) { animation-delay: .15s; }
.hb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hb-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.hb-err { margin: 0; align-self: center; font-size: 13px; color: var(--ink-red); background: var(--tint-red); border-radius: 8px; padding: 6px 10px; text-align: center; }
.hb-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; background: var(--paper); }
.hb-sugg:not(:empty) { padding-bottom: 10px; }
.hb-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.hb-chip:hover { border-color: var(--signal); color: var(--blue); }
.hb-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.hb-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px; font: inherit; font-size: 14px;
  background: var(--surface-2); color: var(--ink); line-height: 1.35; }
.hb-form textarea:focus { outline: none; border-color: var(--signal); background: var(--surface); }
.hb-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blue-fill); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.hb-send svg { width: 18px; height: 18px; }
.hb-send:disabled { opacity: .5; cursor: default; }
.hb-mic { width: 40px; height: 40px; min-height: 40px; border-radius: 50%; flex: none; }
.hb-foot { margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--muted); background: var(--surface); line-height: 1.35; }

@media (max-width: 860px) {
  .hb-root { right: 12px; bottom: calc(74px + var(--safe-b)); }
  .hb-fab { width: 52px; height: 52px; }
  .hb-tab { bottom: calc(150px + var(--safe-b)); }
}
@media (max-width: 640px) {
  /* téléphone : fenêtre plein écran, au-dessus de la barre du bas */
  .hb-panel { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; padding-bottom: var(--safe-b); }
  body.hb-panel-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .hb-panel, .hb-typing span { animation: none; } .hb-fab { transition: none; } }

/* Administration › Hubie */
.hb-adm-head { display: flex; gap: 18px; align-items: flex-start; }
.hb-adm-avatar { width: 84px; height: 84px; border-radius: 50%; flex: none; box-shadow: 0 6px 18px rgba(42,54,81,.2); }
.hb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.hb-stat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.hb-stat strong { font-size: 22px; }
.hb-stat span { font-size: 12.5px; color: var(--muted); }
.hb-qlist { display: grid; gap: 4px; max-height: 520px; overflow-y: auto; }
.hb-q { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.hb-q > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; list-style: none; }
.hb-q > summary::-webkit-details-marker { display: none; }
.hb-q-t { flex: 1 1 260px; font-weight: 600; }
.hb-q-a { padding: 4px 12px 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.hb-kb { border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.hb-kb > summary { padding: 9px 12px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hb-kb > :not(summary) { margin-left: 12px; margin-right: 12px; }
.hb-kb-text { white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--ink-3); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; max-height: 260px; overflow-y: auto; }
.hb-kb .field { margin-bottom: 12px; }
.hb-kb textarea { width: 100%; }
@media (max-width: 640px) { .hb-adm-head { flex-direction: column; } .hb-adm-avatar { width: 64px; height: 64px; } }
/* ------------------------------------------------------------ Boîte à outils › DSTV → CAM (1.16.0, assets/outils-dstv.js) */
.dv-tool { display: grid; gap: 16px; }
.dv-intro { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dv-intro .bx-intro { margin: 0; flex: 1 1 320px; }
.dv-card { display: grid; gap: 12px; }
.dv-card > h3, .dv-head h3 { margin: 0; }
.dv-drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dv-drop:hover, .dv-drop:focus-visible, .dv-drop.over { border-color: var(--brand-orange); background: var(--tint-blue); outline: none; }
.dv-drop-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--brand-orange); border: 1px solid var(--line); }
.dv-drop strong { font-size: 15px; }
.dv-drop-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.dv-loaded { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-green); }
.dv-loaded span { color: var(--ink); }
.dv-loaded > span > svg { width: 18px; height: 18px; flex: none; }
.dv-drop-ico svg { width: 22px; height: 22px; }
.dv-tw { max-height: min(62vh, 640px); overflow: auto; }
.dv-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.dv-table td { vertical-align: top; white-space: nowrap; }
.dv-table td.dv-mark { font-weight: 700; }
.dv-table td.dv-us { white-space: normal; min-width: 160px; font-size: 13px; }
.dv-table tr.dv-error td { background: var(--tint-red); }
.dv-table tr.dv-warn td { background: var(--tint-yellow); }
.bx-tw table.dv-table input.dv-qty { width: 76px; min-width: 76px; min-height: 30px; height: 30px; padding: 2px 8px; text-align: right; }
.bx-tw table.dv-table td { vertical-align: middle; }
.bx-tw table.dv-table td.dv-msgs { vertical-align: top; }
.dv-msgs details summary { cursor: pointer; color: var(--blue); font-weight: 600; margin-top: 2px; }
.dv-msgs { white-space: normal !important; min-width: 260px; font-size: 12.5px; line-height: 1.35; }
.dv-msgs .e, .dv-summary .e { color: var(--ink-red); }
.dv-msgs .w, .dv-summary .w { color: var(--ink-ochre); }
.dv-msgs .i { color: var(--muted); }
.dv-badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dv-badge.ok { color: var(--ink-green); background: var(--tint-green); }
.dv-badge.warn { color: var(--ink-ochre); background: var(--tint-yellow); }
.dv-badge.error { color: var(--ink-red); background: var(--tint-red); }
.dv-summary { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--muted); }
.dv-summary b { color: var(--ink); }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.dv-grid .dv-name { grid-column: span 2; }
.dv-card > p.small { margin: 0; }
.dv-bars { display: grid; gap: 12px; }
.dv-bar { display: grid; gap: 4px; }
.dv-bar-h { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; }
.dv-bar-h .dv-x { color: var(--brand-orange); }
.dv-track { display: flex; height: 28px; border-radius: var(--r-sm); overflow: hidden; background: var(--line-2); }
.dv-seg { flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 600; color: #2A3651; background: #b2bed6; border-right: 2px solid var(--surface); }
.dv-seg.r { background: #f6b28c; }
.dv-seg.sc { background: var(--brand-steel); }
.dv-seg span { overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.dv-doc { display: grid; gap: 14px; font-size: 14.5px; line-height: 1.55; }
.dv-doc h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.dv-doc p, .dv-doc ul, .dv-doc ol { margin: 0 0 8px; }
.dv-doc section { scroll-margin-top: 8px; }
.dv-doc-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-doc-nav a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.dv-doc-nav a:hover { border-color: var(--brand-orange); color: var(--blue); }
.dv-doc table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 13.5px; }
.dv-doc th, .dv-doc td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.dv-doc th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.dv-doc code { background: var(--surface-2); border: 1px solid var(--line-2); padding: 0 5px; border-radius: 4px; font-size: 12.5px; }
.dv-doc .yes { color: var(--ink-green); font-weight: 700; }
.dv-doc .no { color: var(--ink-red); font-weight: 700; }
.dv-note { border-left: 4px solid var(--brand-orange); background: var(--tint-blue); padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.dv-note.warn { border-color: var(--ink-ochre); background: var(--tint-yellow); }
.dv-steps { padding-left: 22px; }
.dv-steps li { margin: 6px 0; }
@media (max-width: 700px) {
  .dv-grid .dv-name { grid-column: 1 / -1; }
  .dv-grid { grid-template-columns: 1fr 1fr; }
  .dv-drop { padding: 18px 12px; }
}
/* IA synthèse messagerie (1.21.0) : fenêtre de synthèse d'une discussion et réglages d'administration */
.convo-sum { gap: 6px; color: var(--orange, #E75200); }
.csum { display: flex; flex-direction: column; gap: 14px; }
.csum-form { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, var(--surface)); }
.csum-form .field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.csum-form textarea { width: 100%; resize: vertical; min-height: 80px; }
.csum-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.csum-row select { min-width: 0; max-width: 100%; flex: 1 1 220px; }
.csum-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.csum-range label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.csum-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.csum-save input[type=text] { flex: 1 1 220px; min-width: 0; }
.csum-go { border-top: 1px dashed var(--line); padding-top: 10px; }
.csum-model { display: flex; align-items: center; gap: 6px; }
.csum-res { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.csum-res.fresh { border-color: color-mix(in srgb, var(--orange, #E75200) 45%, var(--line)); }
.csum-res-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.csum-prompt { margin-bottom: 8px; }
.csum-prompt > summary { cursor: pointer; }
.csum-prompt p { margin: 4px 0 0; white-space: pre-wrap; }
.csum-hist { display: flex; flex-direction: column; gap: 4px; }
.csum-hist-it { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 6px 10px; border: 1px solid var(--line-2, var(--line)); border-radius: 8px; background: var(--surface); cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.csum-hist-it:hover { border-color: var(--blue, #2A3651); }
.csum-hist-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csum-models { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.csum-base { margin: 4px 0 12px; padding-left: 20px; columns: 2 220px; }
.csum-presets { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.csum-preset { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 8px; width: 100%; align-items: start; }
.csum-preset textarea { width: 100%; resize: vertical; }
@media (max-width: 700px) {
  .csum-preset { grid-template-columns: 1fr auto; }
  .csum-preset textarea { grid-column: 1 / -1; grid-row: 2; }
  .csum-hist-it { flex-wrap: wrap; }
}

/* ----- points de blocage extérieurs (1.22.0) : carré à bord sombre au lieu du rond ; identifiant permanent (A-00042, PB-00057) */
.plan-pin.ext { border-radius: 4px; border: 3px solid #1b2333; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.45); }
.plan-pin.ext.focus { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(245,184,0,.75), 0 1px 4px rgba(0,0,0,.45); }
.plan-dot.ext { border-radius: 3px; box-shadow: inset 0 0 0 2px #1b2333; }
.act-ref { display: inline-block; padding: 1px 6px; border-radius: 5px; background: var(--surface-2, #eef1f6); color: var(--ink); font: 700 12px/1.5 ui-monospace, Consolas, monospace; white-space: nowrap; }
.act-ref.ext { background: #fdecea; color: #8c1d14; }
.act-ref-line { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); }
.act-ref-cell { white-space: nowrap; }
.ext-pill { display: inline-block; margin: 0 6px 2px 0; padding: 1px 7px; border-radius: 10px; background: #fdecea; color: #8c1d14; font-size: 11.5px; font-weight: 700; }
.act-link-n { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.btn-ext { border-color: #c8382e; color: #a32a21; }
.btn-ext:hover { background: #fdecea; }
.btn-ext.active, .btn-ext[aria-pressed=true] { background: #c8382e; color: #fff; }
.act-kind-seg { display: flex; flex-wrap: wrap; }
.act-kind-seg button { flex: 1 1 auto; }
.act-kind-seg .kind-externe[aria-pressed=true] { background: #c8382e; border-color: #c8382e; color: #fff; }
.act-ext-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 10px; border-left: 3px solid #c8382e; background: #fdf3f2; border-radius: 6px; }
.act-ext-fields[hidden] { display: none; }
.act-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.act-link-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 12.5px; }
.act-link-chip b { font-family: ui-monospace, Consolas, monospace; }
.act-link-chip.ext { border-color: #e9a29c; background: #fdf3f2; }
.act-link-chip.done { opacity: .6; }
.act-link-x { border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 15px; line-height: 1; padding: 0 4px; }
.act-link-x:hover { color: #c8382e; }
.act-link-add { max-width: 100%; }
.plan-kind-seg { display: flex; margin-bottom: 8px; }
.plan-kind-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.plan-kind-seg b { font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.plan-blk-export { width: 100%; justify-content: center; margin-bottom: 10px; }
.plan-item-ref { display: block; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 640px) { .act-ext-fields { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .act-ref.ext, :root:not([data-theme="light"]) .ext-pill { background: #4a1f1c; color: #ffb4ab; }
  :root:not([data-theme="light"]) .act-ext-fields, :root:not([data-theme="light"]) .act-link-chip.ext { background: #2e1a19; }
  :root:not([data-theme="light"]) .btn-ext { color: #ff8a80; }
}
:root[data-theme="dark"] .act-ref.ext, :root[data-theme="dark"] .ext-pill { background: #4a1f1c; color: #ffb4ab; }
:root[data-theme="dark"] .act-ext-fields, :root[data-theme="dark"] .act-link-chip.ext { background: #2e1a19; }
:root[data-theme="dark"] .btn-ext { color: #ff8a80; }

/* ===== 1.23.0 : suivi des points de blocage, tableau de bord par affaire, indices de plan ===== */
.blk-wait { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 9px; background: var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.blk-wait.late { background: var(--tint-orange); color: var(--ink-orange); }
.blk-wait.done { background: var(--tint-green); color: var(--ink-green); font-weight: 600; }
.blk-rel { font-weight: 600; }
.act-blocked { margin-top: 2px; font-size: 12px; color: var(--ink-red); }
.blk-due-hint { display: block; margin-top: 2px; }
.blk-follow { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #f0c9c4; border-left: 4px solid #b3261e; border-radius: 8px; background: #fff8f7; }
.blk-follow.late { border-left-color: var(--signal); background: #fff4ec; }
.blk-follow.done { border-color: var(--line); border-left-color: var(--ok); background: var(--paper); }
.blk-follow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.blk-follow-head > div:first-child { flex: 1 1 220px; }
.blk-follow-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.blk-norel { color: var(--ink-orange); font-weight: 600; }
.blk-tl { list-style: none; margin: 10px 0 0; padding: 0 0 0 4px; }
.blk-tl-item { position: relative; display: flex; gap: 10px; padding: 0 0 8px; }
.blk-tl-item::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.blk-tl-item:last-child::before { display: none; }
.blk-tl-dot { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; background: var(--muted-2); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.blk-tl-item.ask .blk-tl-dot { background: #b3261e; }
.blk-tl-item.rel .blk-tl-dot { background: var(--signal); }
.blk-tl-item.rep .blk-tl-dot { background: #1f6fb2; }
.blk-tl-item.rep.neg .blk-tl-dot { background: var(--danger); }
.blk-tl-item.lift .blk-tl-dot { background: var(--ok); }
.blk-tl-body { min-width: 0; flex: 1; }
.blk-tl-body .small { white-space: pre-line; }
.blk-tl-del { margin-top: 2px; color: var(--muted); }
.blk-files { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.blk-file { font-size: 12px; }
.blk-impact { margin-top: 6px; }
.blk-impact ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.blk-imp { padding: 4px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); }
.blk-imp.threat { border-color: var(--signal); }
.blk-threat { color: var(--ink-orange); font-weight: 600; }
.blk-mail-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task.blocked { box-shadow: inset 0 -3px 0 #b3261e; }
.blk-flag { margin-right: 4px; }
/* tableau de bord */
.act-dash { display: flex; flex-direction: column; gap: 12px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-head h2 { margin: 0; font-size: 20px; }
.dash-head p { margin: 2px 0 0; }
.akpi.k-ext { border-left-color: #b3261e; }
.akpi.k-ext .akpi-value { color: #b3261e; }
.akpi.k-threat { border-left-color: var(--signal); }
.dash-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); min-width: 0; }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.dash-card-head h3 { margin: 0; font-size: 14px; }
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.dash-table td.num, .dash-table th.num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table td.warn { color: var(--ink-orange); font-weight: 700; }
.dash-table td.bad { color: var(--danger); font-weight: 700; }
.dash-table td.ext { color: #b3261e; font-weight: 700; }
.dash-table tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.dash-blk td { vertical-align: top; }
.dash-gauge { position: relative; display: block; width: 70px; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--line-2); }
.dash-gauge-in { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ok); }
.dash-gauge-in.warn { background: #e08a00; }
.dash-gauge-in.bad { background: var(--danger); }
.dash-gauge-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-2); }
.dash-look { display: flex; flex-direction: column; gap: 8px; }
.dash-week-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dash-week ul, .dash-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-week li { padding: 3px 0 3px 8px; border-left: 3px solid var(--ok); }
.dash-week li.blocked { border-left-color: #b3261e; }
.dash-ok { color: var(--ok); font-weight: 700; }
.akpi-bar-btn.static { cursor: default; }
.akpi-bar-btn.static:hover { background: transparent; }
.plan-vig { font-weight: 700; }
@media (max-width: 900px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }
/* indices de plan : en vigueur / remplacé, pastilles à vérifier */
.plan-vig-badge { padding: 0 6px; border-radius: 8px; background: var(--tint-green); color: var(--ink-green); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.plan-vig-badge.old { background: #b3261e; color: #fff; }
.plan-hint.superseded { background: #fdecea; border-color: #b3261e; color: #8c1d14; }
.plan-superseded { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden; z-index: 2; }
.plan-superseded span { transform: rotate(-30deg); font-size: clamp(28px, 9vw, 120px); font-weight: 800; letter-spacing: .06em; color: rgba(179, 38, 30, .18); white-space: nowrap; border: 6px solid rgba(179, 38, 30, .18); padding: 0 .3em; border-radius: 12px; }
.plan-pin.review { outline: 3px dashed var(--signal); outline-offset: 3px; }
.plan-pin.review::after { content: "!"; position: absolute; top: -9px; right: -9px; width: 15px; height: 15px; border-radius: 50%; background: var(--signal); color: #fff; font: 800 11px/15px Arial, sans-serif; text-align: center; }
.plan-review-box { margin: 4px 0 10px; padding: 8px 10px; border: 1px solid var(--signal); border-radius: 8px; background: var(--tint-orange); }
.plan-review-box h3 { margin: 0 0 4px; }
.plan-review-box .plan-list { margin-top: 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .blk-follow { background: #2e1a19; border-color: #5c2a26; }
  :root:not([data-theme="light"]) .blk-follow.late { background: #33221a; }
  :root:not([data-theme="light"]) .blk-follow.done { background: var(--paper); border-color: var(--line); }
  :root:not([data-theme="light"]) .plan-hint.superseded { background: #3a1f1d; color: #ffb4ab; }
  :root:not([data-theme="light"]) .akpi.k-ext .akpi-value, :root:not([data-theme="light"]) .dash-table td.ext { color: #ff8a80; }
}
:root[data-theme="dark"] .blk-follow { background: #2e1a19; border-color: #5c2a26; }
:root[data-theme="dark"] .blk-follow.late { background: #33221a; }
:root[data-theme="dark"] .blk-follow.done { background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .plan-hint.superseded { background: #3a1f1d; color: #ffb4ab; }
:root[data-theme="dark"] .akpi.k-ext .akpi-value, :root[data-theme="dark"] .dash-table td.ext { color: #ff8a80; }
/* impression du tableau de bord (réunion de chantier) : le tableau de bord seul */
@media print {
  body.print-dash .side, body.print-dash .page-head, body.print-dash .tabbar, body.print-dash #toasts, body.print-dash .hb-root, body.print-dash .dash-head .btn, body.print-dash .dash-blk td:last-child, body.print-dash .dash-blk th:last-child { display: none !important; }
  body.print-dash .main { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  body.print-dash .dash-card, body.print-dash .akpi { break-inside: avoid; }
  body.print-dash .table-wrap { overflow: visible !important; }
}
/* ===== 1.24.0 : rapports PDF des actions, administration des actions ===== */
.rpt-wrap { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 14px; align-items: start; }
.rpt-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; max-height: calc(100vh - 140px); overflow: auto; padding-right: 4px; }
.rpt-scope { padding: 8px 10px; border-radius: 8px; background: var(--surface-2, var(--line-2)); }
.rpt-sec { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.rpt-sec > summary { cursor: pointer; padding: 9px 12px; font-weight: 700; list-style-position: inside; }
.rpt-sec[open] > summary { border-bottom: 1px solid var(--line-2); }
.rpt-sec > :not(summary) { margin: 10px 12px; }
.rpt-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rpt-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.rpt-preset:hover { border-color: var(--signal); }
.rpt-preset strong { font-size: 13px; }
.rpt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.rpt-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rpt-field.full, .rpt-sub.full { grid-column: 1 / -1; }
.rpt-field select, .rpt-field input { width: 100%; }
.rpt-num { max-width: 120px; }
.rpt-sub { padding: 8px 10px; border-left: 3px solid #b3261e; background: var(--surface-2, var(--line-2)); border-radius: 0 8px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.rpt-sub-t { font-weight: 700; font-size: 13px; }
.rpt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rpt-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 14px; min-height: 30px; padding: 0 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.rpt-chip[aria-pressed=true] { background: #b3261e; border-color: #b3261e; color: #fff; }
.rpt-checks { display: flex; flex-direction: column; gap: 6px; }
.rpt-checks .rpt-sub { border-left-color: var(--signal); margin-left: 22px; }
.rpt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.rpt-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rpt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rpt-sel { max-height: calc(100vh - 290px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.rpt-sel thead th { position: sticky; top: 0; background: var(--paper); z-index: 1; }
.rpt-sel tr.rpt-off td { opacity: .45; }
.rpt-late { color: var(--danger); font-weight: 700; }
.rpt-go { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); position: sticky; bottom: 8px; box-shadow: 0 -2px 10px rgba(42,54,81,.08); }
@media (max-width: 900px) { .rpt-wrap { grid-template-columns: minmax(0, 1fr); } .rpt-side { position: static; max-height: none; } .rpt-sel { max-height: 60vh; } }
@media (max-width: 520px) { .rpt-grid, .rpt-presets, .rpt-cols { grid-template-columns: 1fr; } }
.adm-act-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--bg, var(--surface)); }
.adm-act-list input:not([type=checkbox]) { width: 100%; min-width: 140px; }
.adm-act-list input[type=number] { min-width: 0; }
.adm-act-list tr.inactive td { opacity: .6; }
.adm-vars { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.adm-vars code { padding: 0 4px; border-radius: 4px; background: var(--line-2); }
.adm-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.adm-job.off { opacity: .75; }
.adm-job-on { gap: 8px; }
.adm-job-on h2 { margin: 0; }
.adm-job-next { margin: 10px 0 0; font-weight: 600; }
.adm-late-day:empty { display: none; }
/* Administration › Import des affaires (1.25.0) */
.affimp-chips { margin: 4px 0 8px; }
.affimp-chips .chip .btn-link { padding: 0 2px; font-size: 11px; color: var(--ink-2); }
.affimp-det { margin-top: 6px; }
.affimp-det summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.affimp-det ul { max-height: 220px; overflow: auto; margin: 6px 0; padding-left: 20px; }
.affimp-prev .list.kv { margin: 8px 0 10px; }
.affimp-doc h3 { margin: 16px 0 6px; font-size: 15px; }
.affimp-doc ul, .affimp-doc ol { margin: 0; padding-left: 22px; line-height: 1.55; font-size: 14px; }
.affimp-doc li { margin: 3px 0; }
.affimp-doc code, .affimp-dir code { font-size: 12.5px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; word-break: break-all; }

/* ---- IA lecture de documents (1.32.0) : fenêtre « Lire un document » des Actions ---- */
.adoc-drop { display: grid; justify-items: center; gap: 4px; padding: 20px 16px; border: 2px dashed var(--line); border-radius: var(--r-sm); background: var(--paper); text-align: center; cursor: pointer; }
.adoc-drop:hover, .adoc-drop:focus-visible, .adoc-drop.over { border-color: var(--blue); background: var(--tint-blue); outline: none; }
.adoc-drop svg { width: 26px; height: 26px; color: var(--blue); }
.adoc-files { display: grid; gap: 4px; margin-top: 6px; }
.adoc-file { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.adoc-file svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.adoc-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adoc-wait { display: grid; justify-items: center; gap: 6px; padding: 22px 12px; text-align: center; }
.adoc-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--signal); animation: adoc-spin 0.9s linear infinite; }
@keyframes adoc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .adoc-spin { animation-duration: 3s; } }
.adoc-doc { padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line-2); margin-bottom: 10px; }
.adoc-bar { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; flex-wrap: wrap; }
.adoc-items { display: grid; gap: 10px; }
.adoc-item { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--r-sm); background: var(--surface); }
.adoc-item.ext { border-left-color: var(--signal); }
.adoc-item.off { opacity: .55; }
.adoc-item.off:focus-within { opacity: 1; }
.adoc-item.done { display: block; opacity: .8; border-left-color: var(--ok); }
.adoc-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adoc-item-head input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.adoc-n { font-weight: 700; color: var(--ink-3); min-width: 1.4em; }
.adoc-item > input[type=text] { font-weight: 600; }
.adoc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adoc-grid label { display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); align-content: start; }
.adoc-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; }
.adoc-cite { margin: 0; padding: 4px 10px; border-left: 3px solid var(--line); color: var(--ink-3); font-size: 13px; font-style: italic; white-space: pre-wrap; }
@media (max-width: 700px) { .adoc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Boîte e-mail des actions et règles du module (1.33.0) ---- */
.notice-ok { border-color: var(--ok); background: var(--tint-green); }
.ainbox-badge { margin-left: 6px; }
.ainbox-help { padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line-2); line-height: 1.6; }
.ainbox-help code, .act-rules-doc code { font-size: 12.5px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; word-break: break-all; }
.ainbox-table td { vertical-align: top; }
.ainbox-table tr.ainbox-todo td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
.adoc-ref { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.act-rules { display: block; }
.act-rules-doc { display: grid; gap: 14px; width: 100%; max-width: 980px; }
.act-rules-doc > .card { width: auto; max-width: none; }
.act-rules-toc .linkish { text-align: left; }
.act-rules-toc ol { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.act-rules-toc li { margin: 2px 0; }
.act-rule { scroll-margin-top: 80px; }
.act-rule h2 { margin: 0 0 8px; font-size: 18px; }
.act-rule h3 { margin: 14px 0 4px; font-size: 15px; }
.act-rule ul { margin: 0; padding-left: 20px; line-height: 1.6; }
.act-rule li { margin: 4px 0; }
.act-rule p { margin: 0 0 8px; line-height: 1.55; }
.act-rules-table { margin: 6px 0; max-width: 420px; }
@media (max-width: 700px) { .act-rules-toc ol { columns: 1; } }
/* ---- IA rédaction de pages (1.35.0) : Administration › IA rédaction de pages ---- */
.pgai-pages { display: grid; gap: 2px; max-height: 360px; overflow: auto; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); }
.pgai-pages .check { align-items: baseline; }
.pgai-tpls { display: grid; gap: 10px; }
.pgai-tpl { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); }
.pgai-tpl .pg-row input { flex: 1; min-width: 0; font-weight: 600; }
.pgai-tpl textarea { width: 100%; }

/* ---- Boîte à outils › Achats › Comparateur de devis (1.36.0, assets/outils-devis.js) ---- */
.tools-page { --tc-achats: #7a4fb0; }
:root[data-theme="dark"] .tools-page { --tc-achats: #b99be6; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .tools-page { --tc-achats: #b99be6; } }
.tools-page [data-grp="achats"] { --tc: var(--tc-achats); }
.qd, .qd-list { display: grid; gap: 14px; }
.qd .spacer, .qd-bar .spacer { flex: 1; }
.qd-pad { padding: 12px 0; }
.qd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.qd-bar .qd-q { flex: 1 1 260px; min-width: 200px; max-width: 420px; }
.qd-bar select { max-width: 260px; }
.qd-empty { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface); }
.qd-empty p { max-width: 560px; margin: 0; }
.qd-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.qd-ltable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qd-ltable th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.qd-ltable td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.qd-ltable tbody tr { cursor: pointer; }
.qd-ltable tbody tr:hover td, .qd-ltable tbody tr:focus-visible td { background: var(--tint-blue); }
.qd-ltable tbody tr:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pill.qd-st-en_cours { background: var(--tint-yellow); color: var(--ink-orange); }
.pill.qd-st-decidee { background: var(--tint-green); color: var(--ok); }
.pill.qd-st-abandonnee { background: var(--line-2); color: var(--muted); }
.qd-head { display: grid; gap: 8px; }
.qd-head > .btn { justify-self: start; }
.qd-head-main { display: grid; gap: 6px; }
.qd input.qd-title { font-family: var(--f-head); font-size: 20px; font-weight: 700; padding: 6px 10px; border-color: transparent; background: transparent; width: 100%; }
.qd input.qd-title:hover:not(:disabled), .qd input.qd-title:focus { border-color: var(--line); background: var(--surface); }
.qd-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 0 10px; }
.qd-proj { display: inline-flex; align-items: center; gap: 6px; }
.qd-proj input { min-width: 240px; max-width: 360px; min-height: 32px; padding: 2px 8px; }
.qd-head-act { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; }
.qd-save { font-style: italic; }
.qd-card { display: grid; gap: 10px; }
.qd-card-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.qd-card-h h2 { margin: 0; font-size: 16px; }
.qd-card-h p { margin: 0; }
.qd-card h3 { margin: 0 0 4px; }
.qd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qd-files { display: grid; gap: 4px; }
.qd-files a.adoc-fname { color: var(--ink); text-decoration: none; }
.qd-files a.adoc-fname:hover { color: var(--blue); text-decoration: underline; }
.qd-drop { padding: 14px 12px; }
.qd-ai { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.qd-ai .notice { margin: 0; }
.qd-ai textarea { width: 100%; }
.qd-busy { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.qd-pp { display: contents; }
/* tableau comparatif : première colonne figée, une colonne par offre */
.qd-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.qd-table th, .qd-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); vertical-align: top; background: var(--surface); }
.qd-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 12px; text-align: left; border-bottom: 1px solid var(--line); }
.qd-table th.num, .qd-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qd-table .qd-label { position: sticky; left: 0; z-index: 1; min-width: 240px; max-width: 380px; border-right: 1px solid var(--line); }
.qd-table thead .qd-label { z-index: 3; }
.qd-lb { all: unset; cursor: pointer; display: block; white-space: pre-wrap; line-height: 1.35; }
.qd-lb:hover, .qd-lb:focus-visible { color: var(--blue); text-decoration: underline; }
.qd-table tr.qd-lot td { background: var(--paper); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.qd-table tr.qd-lot td:first-child { position: sticky; left: 0; }
.qd-oh { min-width: 132px; vertical-align: bottom !important; }
.qd-ohb { all: unset; cursor: pointer; display: grid; gap: 3px; width: 100%; }
.qd-ohb:disabled { cursor: default; }
.qd-ohb:not(:disabled):hover .qd-oname, .qd-ohb:focus-visible .qd-oname { color: var(--blue); text-decoration: underline; }
.qd-oname { font-weight: 700; font-size: 13px; color: var(--ink); white-space: normal; }
.qd-otags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.qd-rank { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.qd-rank.first { background: var(--tint-green); color: var(--ok); }
.qd-wtag { font-size: 11.5px; font-weight: 700; color: var(--ok); }
.qd-table td.qd-pc { padding: 0; min-width: 132px; text-align: right; }
.qd-pcb { all: unset; box-sizing: border-box; display: grid; justify-items: end; gap: 1px; width: 100%; min-height: 100%; padding: 6px 8px 6px 20px; font-variant-numeric: tabular-nums; white-space: nowrap; position: relative; }
button.qd-pcb { cursor: pointer; }
button.qd-pcb:hover, button.qd-pcb:focus-visible { background: var(--tint-blue); outline: none; }
.qd-pcb small { font-size: 11px; }
.qd-pc.qd-min { box-shadow: inset 3px 0 0 var(--ok); }
.qd-pc.qd-min strong { color: var(--ok); }
.qd-pc.qd-max strong { color: var(--danger); }
.qd-table td.qd-wcol, .qd-table th.qd-win { background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.qd-note { position: absolute; top: 4px; left: 6px; font-size: 12px; color: var(--blue); }
.qd-chip { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-3); }
.qd-chip-inclus { background: var(--tint-green); color: var(--ok); }
.qd-chip-option { background: var(--tint-yellow); color: var(--ink-orange); }
.qd-chip-exclu { background: var(--tint-red); color: var(--danger); }
.qd-chip-absent { background: var(--paper); color: var(--muted); border: 1px dashed var(--line); }
.qd-table tfoot td { background: var(--surface-2); font-size: 12.5px; }
.qd-table tfoot td:first-child { position: sticky; left: 0; z-index: 1; font-weight: 600; }
.qd-table tfoot tr.qd-tsum td { font-size: 13.5px; border-top: 2px solid var(--line); }
.qd-table tfoot tr.qd-gap td { font-weight: 600; }
.qd-best { color: var(--ok); font-weight: 700; }
.qd-warnt { color: var(--danger); font-weight: 600; }
.qd-tools { padding-top: 2px; }
.qd-inl { display: inline-flex; align-items: center; gap: 6px; }
.qd-inl select, .qd-inl input { min-height: 32px; padding: 2px 8px; }
.qd-inl input { width: 120px; }
.qd-legend { margin: 0; }
.qd-lg { display: inline-block; padding: 0 6px; margin-right: 6px; border-radius: 4px; font-weight: 700; }
.qd-lg.qd-min { color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.qd-lg.qd-max { color: var(--danger); }
/* analyse, décision, conditions */
.qd-pre { white-space: pre-wrap; margin: 0; }
.qd-an { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qd-an-b ul, .qd-ol ul { margin: 0; padding-left: 20px; line-height: 1.5; }
.qd-an-warn h3 { color: var(--ink-orange); }
.qd-reco { margin: 0; border-color: var(--ok); background: var(--tint-green); }
.qd-reco p { margin: 4px 0 0; }
.qd-dec { display: grid; gap: 6px; }
.qd-dec-o { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.qd-dec-o.on { border-color: var(--ok); background: var(--tint-green); }
.qd-card textarea { width: 100%; }
.qd-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.qd-offer { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.qd-offer.qd-win { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.qd-offer-h { display: flex; align-items: center; gap: 6px; }
.qd-kv { display: flex; gap: 8px; font-size: 13px; }
.qd-kv span { color: var(--muted); min-width: 78px; }
.qd-kv strong { font-weight: 600; }
.qd-ol { font-size: 13px; }
.qd-ol > span { color: var(--muted); }
.qd-ol-x li { color: var(--danger); }
.qd-flink { display: inline-block; margin-right: 10px; color: var(--blue); }
.qd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qd-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qd-two textarea { width: 100%; }
.qd-seg { flex-wrap: wrap; }
.qd-fchk { display: grid; gap: 2px; }
@media (max-width: 700px) {
  .qd-an, .qd-two, .qd-three { grid-template-columns: minmax(0, 1fr); }
  .qd-table .qd-label { min-width: 150px; max-width: 190px; }
  .qd-proj input { min-width: 0; width: 100%; }
  .qd-proj { display: grid; width: 100%; }
  .qd input.qd-title { font-size: 17px; }
  .qd-bar select { max-width: none; flex: 1 1 140px; }
}
@media print { .qd-head-act, .qd-ai, .qd-drop, .qd-tools { display: none !important; } }

/* Accueil : actualités et arrivants du fil d'actualité (1.43.0) */
button.hub-news-img { border: 0; padding: 0; width: 100%; cursor: pointer; }
button.hub-arrival { border: 0; background: none; width: 100%; text-align: left; font: inherit; cursor: pointer; border-radius: 8px; }
button.hub-arrival:hover { background: var(--surface-2); }
.hub-arrival .fd-avatar { width: 40px; height: 40px; font-size: 14px; }
/* Fil d'actualité : publications à diffuser, programmées, transmises (1.43.0) */
.fd-queue { padding: 0; }
.fd-queue > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.fd-queue > summary::-webkit-details-marker { display: none; }
.fd-queue > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.fd-queue[open] > summary::before { transform: rotate(90deg); }
.fd-q-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fd-q-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.fd-q-row:last-child { border-bottom: 0; }
.fd-q-row.todo { background: var(--tint-blue); }
.fd-q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fd-q-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fd-q-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.fd-q-pill.todo { background: var(--brand-orange); color: #fff; }
.fd-q-pill.sched { background: var(--tint-green); color: var(--ok); }
.fd-q-pill.sent { background: var(--tint-yellow); color: var(--ink); }
.fd-q-cat { font-size: 12px; font-weight: 700; }
.fd-q-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-q-note { font-size: 12.5px; color: var(--ink-2); }
.fd-q-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.fd-c-diff { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.fd-c-diff-h { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.fd-c-diff-h select { width: auto; flex: 1; max-width: 340px; }
.fd-c-opt { display: flex; flex-direction: column; gap: 6px; }
.fd-c-opt[hidden] { display: none; }
.fd-c-opt label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.fd-c-opt label > input, .fd-c-opt label > select { width: auto; min-width: 220px; }
.fd-adm-chip { background: var(--tint-blue); color: var(--blue); }
@media (max-width: 700px) {
  .fd-q-row { flex-direction: column; align-items: stretch; }
  .fd-q-acts { justify-content: flex-start; }
}
