:root {
  --brand-orange: #f0642b;
  --brand-orange-dark: #d84e18;
  --brand-orange-soft: #fff1e9;
  --ink: #0b4e66;
  --ink-2: #143b4a;
  --muted: #667985;
  --line: #dfe7eb;
  --surface: #ffffff;
  --surface-2: #f5f8f9;
  --blue: #3478f6;
  --green: #2ca764;
  --amber: #ee8b16;
  --red: #d83b3b;
  --grey: #8a99a3;
  --purple: #8b5cf6;
  --pink: #db2777;
  --pink-soft: #fce7f3;
  --shadow: 0 12px 34px rgba(20, 59, 74, .12);
  --radius: 18px;
  /* Surface toujours sombre, quel que soit le thème actif — utilisée pour
     les éléments flottants à texte blanc (toasts, barre de glisser-déposer)
     qui ne doivent jamais s'inverser en mode sombre. */
  --overlay-dark: #13242c;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-2);
  background: var(--surface-2);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(52,120,246,.28);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3a071;
  --ink-2: #edf3f5;
  --muted: #aebdc4;
  --line: #344750;
  --surface: #17242a;
  --surface-2: #0f1a1f;
  --brand-orange-soft: #40261c;
  --pink-soft: #3d1530;
  --shadow: 0 12px 34px rgba(0,0,0,.34);
}
html[data-theme="dark"] body { background: var(--surface-2); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .btn,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .suivi-card,
html[data-theme="dark"] .month-cell,
html[data-theme="dark"] .day-agenda,
html[data-theme="dark"] .day-side-panel,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .priority-col-head .count { background: var(--surface); color: var(--ink-2); }
html[data-theme="dark"] .priority-col { background: var(--surface-2); }
html[data-theme="dark"] th { background: #1e3038; }
html[data-theme="dark"] tr:hover td { background: #0f1a1f; }
html[data-theme="dark"] .month-chip, html[data-theme="dark"] .day-task-chip { background: var(--surface-2); }
html[data-theme="dark"] .view-switch button { background: var(--surface); }

@media (max-width: 640px) { .hide-sm { display: none; } }

/* ===== Structure générale ===== */
.app-shell { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: relative;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-left: calc(22px + env(safe-area-inset-left));
  padding-right: calc(22px + env(safe-area-inset-right));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(20,59,74,.06);
}
.topbar::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 6px;
  background: linear-gradient(180deg, var(--brand-orange), var(--brand-orange-dark));
}
.brand { display: flex; align-items: center; min-width: 205px; }
.brand-full-logo { display:block; width:205px; height:62px; object-fit:contain; object-position:left center; }
.brand-copy h1 { margin: 0; font-size: 1.07rem; line-height: 1.15; color: var(--ink); }
.brand-copy p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.topbar-actions > #btn-quick-note,
.topbar-actions > #btn-header-new-postit,
.topbar-actions > #btn-new-task,
.topbar-actions .topbar-more-trigger { flex-shrink: 0; white-space: nowrap; }

.topbar-more-wrap { position: relative; }
.btn.topbar-more-trigger { display: none; font-size: 1.2rem; font-weight: 900; line-height: 1; }
.topbar-more-menu { display: flex; gap: 8px; align-items: center; }
.topbar-more-menu .btn span { display: inline; }
.topbar-menu-divider, .topbar-menu-user { display: none; }

@media (max-width: 860px) {
  .btn.topbar-more-trigger { display: inline-flex; }
  .topbar-more-menu {
    display: none;
    position: absolute; top: calc(100% + 10px); right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow); z-index: 1300; min-width: 220px;
  }
  .topbar-more-menu.open { display: flex; }
  .topbar-more-menu .btn { justify-content: flex-start; width: 100%; }
  .topbar-menu-divider { display: block; height: 1px; background: var(--line); margin: 4px 2px; }
  .topbar-menu-user { display: block; padding: 0 2px; }
}

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(20,59,74,.09); }
.btn-primary { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.btn-primary:hover { background: var(--brand-orange-dark); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-danger { color: var(--red); border-color: rgba(216,59,59,.3); background: #fff7f7; }
.btn-sm { min-height: 34px; padding: 6px 10px; border-radius: 10px; font-size: .82rem; }
.btn-icon { width: 40px; padding: 0; }

.tabs {
  display: flex; align-items: center; gap: 4px; min-height: 48px;
  padding: 6px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab-button {
  border: 0; background: transparent; color: var(--muted);
  padding: 10px 16px; border-radius: 11px; font-weight: 800; white-space: nowrap;
}
.tab-button.active { background: var(--brand-orange-soft); color: var(--brand-orange-dark); }
.tab-spacer { margin-left: auto; }

.main { flex: 1; min-height: 0; }
.view { display: none; }
.view.active { display: block; }
.content-page { padding: 20px; max-width: 1500px; margin: 0 auto; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; color: var(--ink); font-size: 1.4rem; }
.page-head p { margin: 5px 0 0; color: var(--muted); }

/* ===== KPI ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(130px,1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: 0 6px 20px rgba(20,59,74,.05); }
.kpi .kpi-label { color: var(--muted); font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.kpi .kpi-value { color: var(--ink); font-size: 1.65rem; font-weight: 900; margin-top: 6px; }
.kpi.kpi-danger .kpi-value { color: var(--red); }
.kpi.kpi-accent .kpi-value { color: var(--brand-orange-dark); }

/* ===== Légende des couleurs d'état ===== */
.state-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.state-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.state-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.state-legend-dot.state-a_faire { background: var(--blue); }
.state-legend-dot.state-en_cours { background: var(--amber); }
.state-legend-dot.state-termine { background: var(--green); }
.state-legend-dot.state-retard { background: var(--red); }
.state-legend-dot.state-annule { background: var(--grey); }
.state-legend-dot.state-a_suivre { background: var(--purple); }

/* ===== Tableau de priorités ===== */
.priority-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.status-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }

/* ===== Widget "À suivre" ===== */
.suivi-board {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
}
.suivi-board .priority-empty {
  grid-column: 1 / -1; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 6px;
}
.suivi-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--purple);
  border-radius: 13px; padding: 11px 12px; text-align: left; width: 100%; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.suivi-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,59,74,.1); }
.suivi-card.relance-due { border-left-color: var(--red); }
.suivi-card .title { font-weight: 850; color: var(--ink-2); font-size: .88rem; line-height: 1.3; }
.suivi-card .meta { color: var(--muted); font-size: .72rem; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.suivi-card .relance-label { font-weight: 800; }
.suivi-card .relance-label.due { color: var(--red); }
.suivi-card .relance-label.upcoming { color: #6d28d9; }
.priority-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.priority-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 2px; }
.priority-col-head .dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface-2); }
.priority-col-head strong { color: var(--ink); font-size: .92rem; flex: 1; }
.priority-col-head .count { font-size: .74rem; font-weight: 800; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.priority-col-body { display: grid; gap: 8px; }
.priority-empty { color: var(--muted); font-size: .8rem; text-align: center; padding: 18px 6px; }

.dot-blue { background: var(--blue); } .dot-green { background: var(--green); }
.dot-amber { background: var(--amber); } .dot-red { background: var(--red); } .dot-grey { background: var(--grey); }

.task-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--grey);
  border-radius: 13px; padding: 10px 11px; text-align: left; width: 100%; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.task-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,59,74,.1); border-color: rgba(240,100,43,.4); }
.task-card.state-a_faire { border-left-color: var(--blue); }
.task-card.state-en_cours { border-left-color: var(--amber); }
.task-card.state-termine { border-left-color: var(--green); }
.task-card.state-annule { border-left-color: var(--grey); }
.task-card.state-a_suivre { border-left-color: var(--purple); }
.task-card.state-retard { border-left-color: var(--red); }
.task-card .title { font-weight: 850; color: var(--ink-2); font-size: .86rem; line-height: 1.3; }
.task-card .meta { color: var(--muted); font-size: .72rem; margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-card .meta .late { color: var(--red); font-weight: 800; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.badge-a_faire { background: rgba(52,120,246,.1); color: #245cc1; }
.badge-en_cours { background: rgba(238,139,22,.12); color: #a95c00; }
.badge-termine { background: rgba(44,167,100,.1); color: #197a45; }
.badge-annule { background: rgba(138,153,163,.12); color: #586770; }
.badge-a_suivre { background: rgba(139,92,246,.12); color: #6d28d9; }
.badge-relance-due { background: rgba(216,59,59,.1); color: #a72b2b; }
.badge-late { background: rgba(216,59,59,.1); color: #a72b2b; }
.badge-series { background: var(--brand-orange-soft); color: var(--brand-orange-dark); }
.badge-en_preparation { background: rgba(238,139,22,.12); color: #a95c00; }
.badge-pret { background: rgba(52,120,246,.1); color: #245cc1; }
.badge-publie { background: rgba(44,167,100,.1); color: #197a45; }
.badge-blue { background: rgba(52,120,246,.1); color: #245cc1; }
.badge-grey { background: rgba(138,153,163,.12); color: #586770; }

.column-more {
  width: 100%; border: 1px dashed var(--line); background: transparent; color: var(--muted);
  border-radius: 12px; padding: 10px; font-size: .78rem; font-weight: 750; cursor: pointer; text-align: center;
}
.column-more:hover { border-color: var(--brand-orange); color: var(--brand-orange-dark); background: var(--brand-orange-soft); }

/* ===== Calendrier ===== */
.calendar-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.calendar-toolbar .view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.calendar-toolbar .view-switch button { border: 0; background: #fff; color: var(--muted); padding: 8px 14px; font-weight: 800; font-size: .82rem; }
.calendar-toolbar .view-switch button.active { background: var(--brand-orange); color: #fff; }
.calendar-nav { display: inline-flex; align-items: center; gap: 6px; }
.calendar-title { font-weight: 850; color: var(--ink); font-size: 1.05rem; min-width: 190px; text-align: center; }

.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.month-weekday { text-align: center; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; }
.month-cell {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; min-height: 108px;
  padding: 7px; display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  min-width: 0; overflow: hidden; transition: box-shadow .12s ease, border-color .12s ease;
}
.month-cell:hover { border-color: rgba(240,100,43,.4); box-shadow: 0 6px 16px rgba(20,59,74,.08); }
.month-cell.outside { opacity: .45; }
.month-cell.today { border-color: var(--brand-orange); box-shadow: 0 0 0 2px rgba(240,100,43,.18) inset; }
.month-cell .day-num { font-weight: 850; font-size: .82rem; color: var(--ink-2); }
.month-cell.today .day-num { color: var(--brand-orange-dark); }
.day-num-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.month-add-btn {
  border: 1px dashed var(--line); background: transparent; color: var(--muted);
  width: 18px; height: 18px; border-radius: 6px; font-size: .85rem; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: pointer;
  opacity: 0; transition: opacity .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.month-cell:hover .month-add-btn, .month-add-btn:focus-visible { opacity: 1; }
.month-add-btn:hover { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
@media (hover: none) {
  .month-add-btn { opacity: 1; }
}
.month-dots { display: flex; align-items: center; gap: 3px; }
.month-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
  font-size: .6rem; font-weight: 800; color: #fff; line-height: 1;
}
.month-dot.dot-task { background: var(--brand-orange); }
.month-dot.dot-relance { background: var(--purple); }
.month-chip {
  font-size: .68rem; font-weight: 750; padding: 3px 6px; border-radius: 8px; background: var(--surface-2);
  border: 0; border-left: 3px solid var(--grey); text-align: left; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; width: 100%; max-width: 100%; min-width: 0; cursor: grab; display: block; font-family: inherit;
}
.month-chip.dragging { opacity: .4; }
.month-chip.state-a_faire { border-left-color: var(--blue); background: rgba(52,120,246,.08); }
.month-chip.state-en_cours { border-left-color: var(--amber); background: rgba(238,139,22,.08); }
.month-chip.state-termine { border-left-color: var(--green); background: rgba(44,167,100,.08); }
.month-chip.state-annule { border-left-color: var(--grey); }
.month-chip.state-a_suivre { border-left-color: var(--purple); background: rgba(139,92,246,.08); }
.month-chip.state-retard { border-left-color: var(--red); background: rgba(216,59,59,.08); }
.month-more { font-size: .68rem; color: var(--muted); font-weight: 750; padding: 0 2px; }

.day-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.day-agenda { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; position: relative; }
.day-hour-row { display: grid; grid-template-columns: 62px 1fr; border-bottom: 1px solid var(--line); min-height: 52px; cursor: pointer; box-sizing: border-box; }
.day-hour-row:last-child { border-bottom: 0; }
.day-hour-label { color: var(--muted); font-size: .72rem; font-weight: 800; padding: 8px 8px 0 0; text-align: right; }
.day-hour-tasks { padding: 6px 8px; display: grid; gap: 6px; align-content: start; }
.day-events-layer { position: absolute; top: 6px; left: 68px; right: 6px; bottom: 6px; pointer-events: none; }
.day-event-wrap { position: absolute; box-sizing: border-box; padding: 0 2px; pointer-events: auto; }
.day-task-chip.day-event-block {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start; gap: 1px; overflow: hidden; box-shadow: 0 1px 4px rgba(20,59,74,.12);
  min-width: 0;
}
.day-event-block .t-time { font-size: .68rem; flex: 0 0 auto; }
.day-event-block .event-title {
  display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; line-height: 1.15;
}
/* Pour les créneaux courts, l'heure et le titre restent sur une seule ligne. */
.day-event-block.is-compact {
  flex-direction: row; align-items: center; gap: 5px; padding-top: 2px; padding-bottom: 2px;
  line-height: 1; white-space: nowrap;
}
.day-event-block.is-compact .t-time {
  font-size: .62rem; margin-right: 0; white-space: nowrap;
}
.day-event-block.is-compact .event-title {
  flex: 1 1 auto; width: auto; font-size: .74rem;
}

/* Les deux champs horaires conservent exactement les mêmes dimensions. */
#t-heure, #t-heure-fin {
  display: block; width: 100%; min-width: 0; height: 42px; box-sizing: border-box;
}
.day-task-chip {
  border-left: 4px solid var(--grey); background: var(--surface-2); border-radius: 10px;
  padding: 6px 9px; font-size: .8rem; font-weight: 750; cursor: pointer; text-align: left; width: 100%;
}
.day-task-chip.dragging { opacity: .4; }
.day-task-chip.state-a_faire { border-left-color: var(--blue); }
.day-task-chip.state-en_cours { border-left-color: var(--amber); }
.day-task-chip.state-termine { border-left-color: var(--green); }
.day-task-chip.state-annule { border-left-color: var(--grey); }
.day-task-chip.state-a_suivre { border-left-color: var(--purple); }
.day-task-chip.state-retard { border-left-color: var(--red); }
.day-task-chip .t-time { color: var(--muted); font-weight: 800; margin-right: 6px; }
.day-side-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; cursor: pointer; }
.day-side-panel h3 { margin: 0 0 10px; color: var(--ink); font-size: .95rem; }
.day-unscheduled { display: grid; gap: 8px; }

/* ===== Liste ===== */
.filters-row { display: grid; grid-template-columns: minmax(200px,1.4fr) repeat(5,minmax(130px,.8fr)) auto; gap: 9px; margin-bottom: 14px; align-items: end; }
.field { display: grid; gap: 6px; }
.field label { font-size: .74rem; color: var(--muted); font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 9px 10px; border-radius: 11px; min-height: 40px;
}
.field textarea { min-height: 82px; resize: vertical; }
.richtext-toolbar { display:flex; align-items:center; gap:6px; margin-bottom:6px; flex-wrap:wrap; }
.richtext-toolbar button { width:30px; height:30px; border:1px solid var(--line); background:var(--surface); border-radius:7px; color:var(--ink-2); font-size:.85rem; }
.richtext-toolbar button:hover { border-color:var(--brand-orange); color:var(--brand-orange); }
.richtext-toolbar .rich-swatch { width:22px; height:22px; border-radius:50%; border:1px solid rgba(0,0,0,.15); padding:0; }
.richtext-toolbar .rich-swatch:hover { transform:scale(1.12); border-color:rgba(0,0,0,.3); }
.richtext-toolbar .rich-swatch-text { border-radius:6px; background:var(--surface); font-weight:900; font-size:.78rem; }
.richtext-toolbar .rich-toolbar-sep { width:1px; height:20px; background:var(--line); margin:0 2px; }
.richtext-hint { margin-left:4px; }
.postit-content mark,.note-card-content mark,.postit-view-content mark { padding:0 1px; border-radius:2px; }
.hl-y { background:#fff59d; } .hl-g { background:#b9f6ca; } .hl-b { background:#b3e5fc; } .hl-p { background:#f8bbd0; } .hl-o { background:#ffe0b2; }
.tc-r { color:#d32f2f; } .tc-b { color:#1976d2; } .tc-g { color:#2e7d32; } .tc-o { color:#f57c00; } .tc-p { color:#7b1fa2; } .tc-k { color:#000000; } .tc-w { color:#ffffff; background:#333; padding:0 3px; border-radius:2px; }
.postit-content .postit-list,.note-card-content .postit-list,.postit-view-content .postit-list { margin:4px 0; padding-left:20px; }
.postit-content .postit-list li,.note-card-content .postit-list li,.postit-view-content .postit-list li { margin:2px 0; }
.field select[multiple] { min-height: 40px; }
.field-hint-link {
  align-self: flex-start; border: 0; background: transparent; color: var(--brand-orange-dark);
  font-size: .76rem; font-weight: 750; padding: 2px 0; cursor: pointer; text-align: left;
}
.field-hint-link:hover { text-decoration: underline; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { position: sticky; top: 0; background: #f7fafb; z-index: 1; color: var(--muted); text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
th.sorted { color: var(--brand-orange-dark); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: #fffaf7; }
.cell-title { font-weight: 850; color: var(--ink-2); min-width: 200px; }
.table-actions { display: flex; gap: 5px; white-space: nowrap; }
.table-count { color: var(--muted); font-size: .82rem; }
.table-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 6px; }

/* ===== Dialog / formulaire ===== */
.dialog[open] {
  border: 0; border-radius: 20px; padding: 0;
  display: flex; flex-direction: column;
  width: min(640px, calc(100vw - 28px));
  margin-top: max(16px, calc(env(safe-area-inset-top) + 10px));
  margin-bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  margin-left: auto; margin-right: auto;
  max-height: calc(100vh - max(32px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  box-shadow: 0 25px 80px rgba(20,59,74,.28);
}
.dialog:not([open]) { display: none; }
.dialog::backdrop { background: rgba(12,36,45,.48); backdrop-filter: blur(3px); }
.dialog-head { padding: 17px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.dialog-head h2 { margin: 0; color: var(--ink); font-size: 1.12rem; flex: 1; }
.dialog-body { padding: 18px 19px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.task-draft-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--warning-soft, #fff4e0); border: 1px solid var(--warning, #e0a530); color: var(--warning-text, #7a5310); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
.task-draft-banner.hidden { display: none; }
.task-draft-banner-actions { display: flex; gap: 8px; flex: none; }
.dialog-foot {
  padding: 14px 19px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; flex: 0 0 auto;
}
.dialog-foot-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dialog-foot-group-end { margin-left: auto; }

@media (max-width: 560px) {
  .dialog-foot { flex-direction: column-reverse; align-items: stretch; }
  .dialog-foot-group { width: 100%; }
  .dialog-foot-group-end { margin-left: 0; }
  .dialog-foot-group .btn { flex: 1 1 0; }
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.toast-stack { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3000; display: grid; gap: 9px; width: min(390px, calc(100vw - 36px)); }
.toast { background: var(--overlay-dark); color: #fff; border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .84rem; animation: toast-in .2s ease; }
.toast.error { background: #9f2727; }
.toast.success { background: #176d42; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .priority-board, .status-board { grid-template-columns: repeat(2, 1fr); }
  .day-layout { grid-template-columns: 1fr; }
  .day-side-panel { order: -1; }
  .filters-row { grid-template-columns: 1fr 1fr; }
}
/* En dessous de 1100px, la barre du haut passe systématiquement sur deux
   lignes (marque, puis actions) : au-delà d'un certain nombre de boutons
   (Note, Nouvelle tâche, Rappels, Mode sombre, Déconnexion…), les caser
   tous sur une seule ligne à côté du titre devient impossible à garantir
   de façon fiable sur toutes les tailles d'écran et tous les navigateurs —
   ce point fixe élimine ce risque plutôt que de le limiter à un cas précis. */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .brand { min-width: 0; flex: 1 1 100%; }
  .topbar-actions { flex: 1 1 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; row-gap: 8px; }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 10px;
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
  }
  .brand-copy p { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .priority-board, .status-board { grid-template-columns: 1fr; }
  .content-page { padding: 13px; }
  .filters-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .month-grid { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
  .month-cell { min-height: 74px; padding: 4px; }
  .month-chip { display: none; }
  .month-cell .day-num { font-size: .74rem; }
  .week-grid { grid-template-columns: 44px repeat(7, minmax(90px,1fr)); }
}

/* ===== Boutons d'export ===== */
.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Glisser-déposer ===== */
.task-card { cursor: grab; }
.task-card.dragging { opacity: .4; }
tr[draggable="true"] { cursor: grab; }
tr.dragging { opacity: .4; }
.priority-col.drop-hover, .month-cell.drop-hover, .week-hour-cell.drop-hover,
.week-allday-cell.drop-hover, .day-hour-row.drop-hover, .day-side-panel.drop-hover {
  outline: 2px dashed var(--brand-orange);
  outline-offset: -2px;
  background: var(--brand-orange-soft);
}

.drop-bar {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(calc(100% + 34px));
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--overlay-dark); color: #fff; padding: 12px 18px; border-radius: 16px;
  box-shadow: var(--shadow); z-index: 2500; transition: transform .2s ease;
  max-width: calc(100vw - 24px);
}
body.drag-active .drop-bar { transform: translateX(-50%) translateY(0); }
.drop-bar-label { font-weight: 800; font-size: .82rem; white-space: nowrap; }
.drop-bar-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drop-bar-caption { font-size: .72rem; color: #b7c3c9; margin-right: 2px; }
.drop-chip {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff;
  padding: 6px 11px; border-radius: 999px; font-size: .78rem; font-weight: 750; cursor: pointer;
}
.drop-chip.drop-hover { background: var(--brand-orange); border-color: var(--brand-orange); }

/* ===== Vue Semaine ===== */
.week-grid {
  display: grid; grid-template-columns: 60px repeat(7, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 15px; overflow: hidden;
}
.week-grid > * { background: #fff; }
.week-corner { background: var(--surface-2); }
.week-day-head {
  background: var(--surface-2); text-align: center; padding: 8px 4px; font-size: .74rem;
  color: var(--muted); font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: .03em;
}
.week-day-head strong { display: block; font-size: 1rem; color: var(--ink-2); font-weight: 850; margin-top: 2px; }
.week-day-head.today { color: var(--brand-orange-dark); }
.week-day-head.today strong { color: var(--brand-orange-dark); }
.week-allday-label, .week-hour-label {
  padding: 6px; font-size: .68rem; color: var(--muted); font-weight: 800; text-align: right;
  background: var(--surface-2);
}
.week-allday-cell, .week-hour-cell { padding: 4px; min-height: 40px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.week-hour-cell { min-height: 46px; }
.week-chip { padding: 4px 7px; font-size: .7rem; }

/* ===== Checklist ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.section-head h3 { margin: 0; color: var(--ink); font-size: .95rem; }
.checklist-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.checklist-progress { font-size: .78rem; font-weight: 800; color: var(--muted); }
.checklist-items { display: grid; gap: 6px; margin-bottom: 10px; }
.checklist-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface-2); font-size: .86rem; cursor: pointer;
}
.checklist-item input { accent-color: var(--brand-orange); width: 16px; height: 16px; }
.checklist-item span { flex: 1; }
.checklist-item.done span { text-decoration: line-through; color: var(--muted); }
.checklist-remove {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .8rem;
  padding: 2px 6px; border-radius: 6px;
}
.checklist-remove:hover { background: rgba(216,59,59,.1); color: var(--red); }
.checklist-add { display: flex; gap: 8px; }
.checklist-add input { flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; min-height: 40px; }

html[data-theme="dark"] .week-grid > * { background: var(--surface); }
html[data-theme="dark"] .week-corner,
html[data-theme="dark"] .week-day-head,
html[data-theme="dark"] .week-allday-label,
html[data-theme="dark"] .week-hour-label { background: var(--surface-2); }
html[data-theme="dark"] .checklist-item { background: var(--surface-2); }

/* ===== Pièces jointes ===== */
.attachments-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.attachment-items { display: grid; gap: 6px; margin-bottom: 10px; }
.attachment-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface-2); font-size: .84rem;
}
.attachment-icon { font-size: 1.05rem; }
.attachment-name { flex: 1; color: var(--ink-2); font-weight: 750; text-decoration: none; word-break: break-word; }
.attachment-name:hover { text-decoration: underline; color: var(--brand-orange-dark); }
.attachment-size { white-space: nowrap; }
.attachment-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.attachment-add input[type="file"] { flex: 1; min-width: 0; font-size: .8rem; }

/* ===== Discussion / commentaires ===== */
.comments-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.comment-items { display: grid; gap: 8px; margin-bottom: 12px; max-height: 260px; overflow-y: auto; }
.comment-item { border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: var(--surface-2); }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-head strong { color: var(--ink-2); font-size: .84rem; }
.comment-head .checklist-remove { margin-left: auto; }
.comment-message { margin: 5px 0 0; font-size: .85rem; white-space: pre-wrap; word-break: break-word; }
.comment-add { display: grid; gap: 8px; }
.comment-add input { border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; min-height: 40px; }
.comment-add textarea { border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; min-height: 70px; resize: vertical; font: inherit; }
.comment-add .btn { justify-self: start; }

html[data-theme="dark"] .attachment-item, html[data-theme="dark"] .comment-item { background: var(--surface-2); }

/* ===== Notes d'appel ===== */
.notes-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 4px; }
.note-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-orange);
  border-radius: 13px; padding: 12px 13px;
}
.note-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.note-card-meta strong { color: var(--ink-2); font-size: .86rem; }
.note-card-content { margin: 0 0 10px; font-size: .85rem; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; line-height: 1.4; max-height: 5.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.note-card-readmore { display:none; background:none; border:none; padding:0; margin:-4px 0 8px; font-size:.78rem; font-weight:700; text-decoration:underline; cursor:pointer; color:#164e63; }
.note-card-readmore.visible { display:inline-block; }
.note-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
html[data-theme="dark"] .note-card { background: var(--surface); }

/* ===== Rappels ===== */
.reminder-toggle-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface-2); font-size: .86rem; cursor: pointer;
}
.reminder-toggle-row input { accent-color: var(--brand-orange); width: 16px; height: 16px; }

/* ===== Portée de modification (occurrence / série) ===== */
.scope-radio-group { display: grid; gap: 8px; margin-top: 4px; }
.scope-radio-option {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); font-size: .85rem; cursor: pointer; font-weight: 600;
}
.scope-radio-option:has(input:checked) { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.scope-radio-option input { accent-color: var(--brand-orange); width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }

/* ===== Abonnement calendrier ===== */
.subscribe-instructions { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.subscribe-instructions p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.subscribe-instructions strong { color: var(--ink-2); }
#subscribe-url, #subscribe-webcal-url { font-size: .78rem; color: var(--muted); background: var(--surface-2); }
.subscribe-url-row { display:flex; gap:8px; align-items:center; }
.subscribe-url-row input { min-width:0; flex:1; }
.subscribe-iphone-card { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; padding:14px; border:1px solid color-mix(in srgb, var(--brand-orange) 35%, var(--line)); border-radius:14px; background:var(--brand-orange-soft); }
.subscribe-iphone-card strong { color:var(--ink); }
.subscribe-iphone-card p { margin:3px 0 0; color:var(--muted); font-size:.8rem; line-height:1.4; }
@media (max-width:640px){ .subscribe-iphone-card{align-items:stretch;flex-direction:column}.subscribe-iphone-card .btn{width:100%}.subscribe-url-row{align-items:stretch}.subscribe-url-row .btn{flex:0 0 auto} }

/* ===== Page de connexion ===== */
.login-body {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 20px; padding-top: calc(20px + env(safe-area-inset-top)); padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.login-wrap { width: 100%; max-width: 400px; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 26px; box-shadow: 0 25px 80px rgba(20,59,74,.16); display: grid; gap: 16px;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.login-brand h1 { margin: 0; font-size: 1.05rem; color: var(--ink); line-height: 1.25; }
.login-error {
  margin: 0; background: rgba(216,59,59,.1); color: #a72b2b; border-radius: 11px;
  padding: 9px 12px; font-size: .84rem; font-weight: 650;
}
.login-submit { width: 100%; margin-top: 4px; }

@media (max-width: 480px) {
  .login-card { padding: 22px 18px; border-radius: 16px; }
}

/* ================= V2 ================= */
.version-badge { display:inline-flex; align-items:center; margin-left:6px; padding:2px 7px; border-radius:999px; background:color-mix(in srgb, var(--brand-orange) 15%, transparent); color:var(--brand-orange); font-size:.64rem; font-weight:900; vertical-align:middle; }
.calendar-date-picker { display:flex; align-items:center; gap:6px; }
.calendar-date-picker select { min-width:110px; height:36px; padding:0 28px 0 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; font-size:.82rem; font-weight:700; }
.calendar-date-picker select:last-child { min-width:86px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media (max-width:720px){ .calendar-toolbar{align-items:stretch}.calendar-date-picker{width:100%}.calendar-date-picker select{flex:1;min-width:0}.calendar-title{width:100%;text-align:center}.version-badge{display:none} }

/* ===== V2.1 : en-tête et navigation fixes ===== */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.app-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.topbar,
.tabs {
  flex: 0 0 auto;
  position: relative;
  z-index: 1100;
}

.topbar {
  isolation: isolate;
}

.tabs {
  z-index: 1050;
  scrollbar-width: thin;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.view.active {
  min-width: 0;
  min-height: 100%;
}

.content-page {
  width: 100%;
}

@media (max-width: 640px) {
  .main {
    scrollbar-gutter: auto;
  }

  .content-page {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* ================= Mailing builder ================= */
.mailing-page{max-width:none}.mailing-head{align-items:center}.mail-builder{display:grid;grid-template-columns:220px minmax(0,1fr) 270px;gap:14px;min-height:calc(100vh - 230px)}
.mail-sidebar,.mail-workspace{background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:14px;min-width:0}.mail-sidebar{padding:14px;align-self:start;position:sticky;top:8px;max-height:calc(100vh - 190px);overflow:auto}.mail-side-title{font-weight:800;margin:2px 0 10px}.mail-blocks{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0 18px}.mail-block{border:1px solid var(--border,#ddd);background:var(--surface-2,#f8fafc);padding:10px 6px;border-radius:9px;cursor:grab;font:inherit;font-size:.8rem}.mail-block:hover{border-color:#e7581c;transform:translateY(-1px)}.mail-theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:14px}.mail-theme{border:2px solid transparent;border-radius:8px;padding:8px;background:var(--surface-2,#f4f4f5);cursor:pointer}.mail-theme.active{border-color:#e7581c}.mail-workspace{display:flex;flex-direction:column;overflow:hidden}.mail-device-bar{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border-bottom:1px solid var(--border,#eee)}.mail-stage{flex:1;background:#dfe3e8;padding:22px;overflow:auto;display:flex;justify-content:center}.mail-canvas{width:min(100%,600px);min-height:700px;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.13);transition:.2s;padding:0}.mail-stage.mobile .mail-canvas{width:375px}.mail-canvas:empty:after{content:'Glissez vos modules ici';display:flex;min-height:680px;align-items:center;justify-content:center;color:#8b919a;font-weight:700;border:2px dashed #c5cad1;margin:12px}.mail-item{position:relative;border:2px solid transparent;cursor:pointer}.mail-item:hover{border-color:#f4a27f}.mail-item.selected{border-color:#e7581c}.mail-item.dragging{opacity:.4}.mail-item-tools{position:absolute;right:4px;top:4px;z-index:4;display:none;gap:3px}.mail-item:hover .mail-item-tools,.mail-item.selected .mail-item-tools{display:flex}.mail-item-tools button{border:0;border-radius:5px;background:#222;color:white;width:25px;height:25px;cursor:pointer}.mail-drop-marker{height:5px;background:#e7581c;border-radius:3px;margin:2px}.mail-empty-inspector{padding:18px 5px;color:var(--muted,#777);font-size:.9rem}.mail-inspector .field{display:block;margin-bottom:10px}.mail-inspector label span,.mail-sidebar label span{display:block;font-weight:650;font-size:.78rem;margin-bottom:4px}.mail-inspector input,.mail-inspector select,.mail-inspector textarea,.mail-sidebar input,.mail-sidebar select{width:100%;box-sizing:border-box}.mail-inspector textarea{min-height:90px;resize:vertical}.mail-inline{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mail-check{display:flex!important;gap:7px;align-items:center}.mail-check input{width:auto!important}.mail-preview-dialog{width:min(1000px,94vw);height:min(850px,90vh);padding:0;border:0;border-radius:14px}.mail-preview-dialog::backdrop{background:rgba(0,0,0,.6)}.mail-preview-head{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #ddd}.mail-preview-frame{width:100%;height:calc(100% - 50px);border:0;background:#eee}
@media(max-width:1100px){.mail-builder{grid-template-columns:190px minmax(0,1fr)}.mail-inspector{grid-column:1/-1;position:static;max-height:none}.mail-inspector-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mail-inspector-form .field{margin:0}}
@media(max-width:760px){.mail-builder{display:block}.mail-sidebar{position:static;max-height:none;margin-bottom:12px}.mail-blocks{grid-template-columns:repeat(3,1fr)}.mail-stage{padding:8px}.mail-canvas{width:100%!important}.mail-inspector-form{display:block}}
.mailing-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.mail-draft-select{min-width:220px;max-width:320px;height:36px;border:1px solid var(--border,#d8dce2);border-radius:8px;background:var(--surface,#fff);color:inherit;padding:0 9px}.mail-inspector small{display:block;color:var(--muted,#6b7280);font-size:.72rem;margin-top:4px}.btn-danger{background:#b42318!important;color:#fff!important;border-color:#b42318!important}
@media(max-width:760px){.mailing-actions{width:100%}.mail-draft-select{width:100%;max-width:none}.mailing-actions .btn{flex:1 1 auto}}

/* V2.4 — bibliothèque de modules Mailing étendue */
.mail-palette .mail-blocks{max-height:52vh;overflow:auto;padding-right:4px;align-content:start}
.mail-block{min-height:38px;text-align:left}
@media(max-width:1100px){.mail-palette .mail-blocks{max-height:none}}


/* V6.48 — intégration de l'agenda social joint */
#view-agenda-social.active{padding:0;overflow:hidden;}
.agenda-social-embed-page{width:100%;height:100%;min-height:0;overflow:hidden;background:#f5f7fa;}
.agenda-social-frame{display:block;width:100%;height:100%;min-height:calc(100vh - var(--app-fixed-offset, 126px));border:0;background:#f5f7fa;}
@media(max-width:760px){
  .agenda-social-frame{min-height:calc(100vh - var(--app-fixed-offset-mobile, 112px));}
}


/* ===== V2.11 : gestionnaire de mise à jour PWA ===== */
#btn-app-update.update-available {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(44,167,100,.16);
}
#btn-app-update:disabled { cursor: progress; opacity: .78; }.rate-pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 12%,transparent);font-weight:700;font-size:.78rem}.ocr-working{animation:pulse 1.2s infinite}@keyframes pulse{50%{opacity:.45}}
.export-file-icon{width:38px;height:38px;display:inline-grid;place-items:center;border-radius:8px;font-size:.72rem;font-weight:900;color:#fff;flex:0 0 auto}.export-file-icon.excel{background:#1f7244}.export-file-icon.png{background:#5b4bdb}/* V2.25 — composition PNG dédiée {position:fixed!important;left:-20000px!important;top:0!important;width:1180px!important;max-width:1180px!important;padding:26px 28px!important;background:#fff!important;color:#17212b!important;z-index:-1!important;box-sizing:border-box!important}/* V2.26 — export PNG plus étroit {
  width:900px!important;
  max-width:900px!important;
  padding:22px 24px!important;
}

/* Fluent UI icon system */
.fui-icon{width:1.15em;height:1.15em;display:inline-block;vertical-align:-.18em;flex:0 0 auto;color:currentColor}
.btn .fui-icon,.nav-item .fui-icon{width:1.05rem;height:1.05rem}
.btn-icon .fui-icon{width:1rem;height:1rem}


/* V3 — Post-it */
.postit-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}.postit-toolbar .field{width:min(420px,100%)}.postit-count{font-weight:750;color:var(--muted)}
.postit-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;align-items:start}
.postit-card{min-height:210px;padding:18px;border:1px solid rgba(0,0,0,.08);border-radius:4px 14px 5px 14px;box-shadow:0 8px 18px rgba(31,41,55,.12);display:flex;flex-direction:column;transform:rotate(-.25deg);transition:transform .16s ease,box-shadow .16s ease}
.postit-card:nth-child(even){transform:rotate(.3deg)}.postit-card:hover{transform:translateY(-3px) rotate(0);box-shadow:0 13px 28px rgba(31,41,55,.18)}
.postit-card header{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid rgba(0,0,0,.1);padding-bottom:8px}.postit-card header span{font-size:.72rem;color:#555}.postit-card p{flex:1;line-height:1.55;white-space:normal;overflow-wrap:anywhere}.postit-card footer{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.postit-card footer .btn:first-child{margin-right:auto}
.postit-yellow{background:#fff2a8}.postit-blue{background:#cfeeff}.postit-green{background:#d7f5c5}.postit-pink{background:#ffd7e6}.postit-orange{background:#ffe0bd}
html[data-theme="dark"] .postit-card{color:#17202a;box-shadow:0 9px 25px rgba(0,0,0,.42)}
@media(max-width:640px){.postit-toolbar{align-items:stretch;flex-direction:column}.postit-board{grid-template-columns:1fr}}

/* ============================================================
   V4 — Mur de Post-it / espace de travail visuel
   ============================================================ */
.postit-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,240px) auto auto auto;align-items:end;gap:12px}
.postit-board-filter{width:auto!important}.postit-toggle{height:42px;display:flex;align-items:center;gap:7px;font-weight:700;white-space:nowrap}
.postit-board-shell{position:relative;overflow:auto;min-height:590px;border:1px solid var(--line);border-radius:20px;background-color:var(--surface-2);background-image:radial-gradient(circle at 1px 1px,color-mix(in srgb,var(--muted) 22%,transparent) 1px,transparent 0);background-size:22px 22px}
.postit-board{position:relative;min-width:940px;min-height:590px;padding:0!important;display:block!important}
.postit-card{position:absolute;width:265px;min-height:225px;padding:25px 17px 15px!important;border:1px solid rgba(30,41,59,.12)!important;border-radius:3px 12px 4px 11px!important;box-shadow:0 12px 25px rgba(31,41,55,.16)!important;display:flex;flex-direction:column;transform:rotate(var(--postit-rotation,0deg))!important;transition:box-shadow .16s ease,transform .16s ease;touch-action:none}
.postit-card:hover{transform:translateY(-2px) rotate(var(--postit-rotation,0deg))!important;box-shadow:0 17px 32px rgba(31,41,55,.23)!important;z-index:5}.postit-card.dragging{transform:scale(1.025) rotate(0)!important;z-index:30;box-shadow:0 24px 42px rgba(31,41,55,.3)!important}
.postit-tape{position:absolute;top:-11px;left:50%;width:82px;height:27px;transform:translateX(-50%) rotate(-2deg);background:rgba(231,224,201,.72);border-left:1px solid rgba(255,255,255,.5);border-right:1px solid rgba(120,110,90,.12);box-shadow:0 2px 3px rgba(0,0,0,.08);clip-path:polygon(3% 8%,97% 0,94% 95%,0 100%);pointer-events:none}
.postit-drag-handle,.postit-star{position:absolute;top:7px;border:0;background:transparent;color:#3f4854;width:27px;height:27px;border-radius:7px;display:grid;place-items:center;padding:0}.postit-drag-handle{left:8px;cursor:grab}.postit-drag-handle:active{cursor:grabbing}.postit-star{right:8px;cursor:pointer}.postit-star.active{color:#a16207;background:rgba(255,255,255,.42)}
.postit-card header{margin-top:5px}.postit-card header span{display:block;text-align:right;max-width:120px}.postit-content{flex:1;line-height:1.48;overflow-wrap:anywhere;margin:10px 0;max-height:8.9em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical}.postit-content a,.postit-url{color:#164e63;text-decoration:underline;font-weight:650}
.postit-readmore{display:none;align-self:flex-start;background:none;border:none;padding:0;margin:-6px 0 8px;font-size:.8rem;font-weight:700;text-decoration:underline;cursor:pointer;color:#164e63}
.postit-readmore.visible{display:inline-block}
.postit-view-content{overflow-wrap:anywhere;line-height:1.55;color:var(--ink)}
.postit-view-content a{color:#164e63;text-decoration:underline;font-weight:650}
.postit-links,.postit-assets{display:grid;gap:6px;margin:7px 0}.postit-url,.postit-file{display:flex;align-items:center;gap:5px;font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.postit-image{display:block;border-radius:9px;overflow:hidden;border:1px solid rgba(0,0,0,.12)}.postit-image img{display:block;width:100%;height:112px;object-fit:cover}
.postit-card footer{padding-top:9px}.postit-card footer .btn{min-height:32px}.postit-purple{background:#e7d9ff}.postit-white{background:#fff}.postit-file-list{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.postit-file-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);font-size:.75rem}.postit-file-chip button{border:0;background:transparent;font-size:1rem;line-height:1;cursor:pointer}
html[data-theme="dark"] .postit-board-shell{background-color:#111827}.postit-card{color:#17202a}
@media(max-width:900px){.postit-toolbar{grid-template-columns:1fr 1fr}.postit-count{grid-column:1/-1}.postit-board{min-width:760px}}
@media(max-width:640px){.postit-toolbar{grid-template-columns:1fr}.postit-board-shell{min-height:520px}.postit-board{min-width:680px}}

/* V4.1 — Mur Post-it intelligent */
.postit-toolbar{grid-template-columns:minmax(220px,1fr) minmax(150px,210px) auto minmax(145px,180px) auto auto auto!important}
.postit-layout-field{width:auto!important}.postit-zoom-controls{display:flex;align-items:center;gap:5px;height:42px}.postit-zoom-controls .btn{min-width:36px;padding:7px}.postit-zoom-controls span{min-width:52px;text-align:center;font-size:.78rem;font-weight:800;color:var(--muted)}
.postit-board{transform-origin:top left;transition:transform .18s ease}.postit-card.postit-new{animation:postit-pop .28s ease-out both}@keyframes postit-pop{from{opacity:0;transform:scale(.88) rotate(0)}to{opacity:1;transform:scale(1) rotate(var(--postit-rotation,0deg))}}
.postit-card.dragging{cursor:grabbing}.postit-board-shell.panning{cursor:grabbing;user-select:none}.postit-board-shell{overscroll-behavior:contain}
.postit-align-guide{position:absolute;pointer-events:none;background:var(--primary);opacity:.55;z-index:20}.postit-align-guide.vertical{width:1px;top:0;bottom:0}.postit-align-guide.horizontal{height:1px;left:0;right:0}
@media(max-width:1100px){.postit-toolbar{grid-template-columns:1fr 1fr 1fr!important}.postit-zoom-controls,.postit-count{grid-column:auto}}
@media(max-width:700px){.postit-toolbar{grid-template-columns:1fr!important}.postit-zoom-controls{justify-content:flex-start}}

/* V4.2 — contrôles de disposition et zoom Post-it */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.postit-layout-switch{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
.postit-layout-switch .btn{min-height:42px;border:0!important;border-radius:0!important;padding:8px 11px;white-space:nowrap}
.postit-layout-switch .btn+ .btn{border-left:1px solid var(--line)!important}
.postit-layout-switch .btn:hover{background:var(--primary-soft);color:var(--primary)}
.postit-layout-switch .btn.active{background:var(--primary);color:#fff}
.postit-layout-switch .btn.active:hover{background:var(--primary-dark,var(--primary));color:#fff}
.postit-zoom-sign{font-size:1.35rem!important;font-weight:700!important;line-height:1!important;font-family:Arial,Helvetica,sans-serif!important}
#btn-reset-postit-layout:disabled{opacity:.45;cursor:not-allowed;filter:none}
.postit-card{transition:left .28s ease,top .28s ease,box-shadow .16s ease,transform .16s ease}
.postit-card.dragging{transition:box-shadow .16s ease,transform .16s ease}
@media(max-width:700px){.postit-layout-switch{width:100%}.postit-layout-switch .btn{flex:1;padding-inline:7px}}


/* ===== V5 : recherche globale, barre Post-it compacte, médiathèque ===== */
.global-search-wrap{position:relative;display:flex;align-items:center;gap:8px;min-width:260px;max-width:420px;flex:1;margin-left:auto}.global-search-wrap>svg,.global-search-wrap>[data-fui]{width:18px;height:18px;color:var(--muted)}.global-search-wrap input{width:100%;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);padding:0 12px}.global-search-results{position:absolute;top:46px;left:0;right:0;z-index:80;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);max-height:420px;overflow:auto;padding:6px}.global-search-results button{display:flex;flex-direction:column;width:100%;border:0;background:transparent;color:var(--text);text-align:left;padding:10px;border-radius:8px}.global-search-results button:hover{background:var(--primary-soft)}.global-search-results span{font-size:.76rem;color:var(--muted)}
.postit-toolbar{grid-template-columns:minmax(220px,1fr) minmax(160px,220px) auto minmax(250px,auto) auto auto auto!important}.postit-color-palette{display:flex;align-items:center;gap:5px;min-height:42px}.palette-label{font-size:.72rem;font-weight:800;color:var(--muted);margin-right:3px}.postit-color-choice{width:27px;height:27px;border-radius:50%;border:2px solid transparent;box-shadow:0 0 0 1px var(--line);background:var(--surface);cursor:pointer}.postit-color-choice:hover,.postit-color-choice.active{transform:translateY(-1px);box-shadow:0 0 0 2px var(--primary)}.color-yellow{background:#fff2a8}.color-orange{background:#ffd0a8}.color-green{background:#ccefb8}.color-blue{background:#c8e7ff}.color-purple{background:#dfd0ff}.color-pink{background:#ffd0e5}.color-white{background:#fff}.postit-display-menu-wrap{position:relative}.postit-display-menu{position:absolute;right:0;top:46px;z-index:50;min-width:200px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px}.postit-display-menu button{width:100%;border:0;background:transparent;color:var(--text);padding:9px 10px;text-align:left;border-radius:7px}.postit-display-menu button:hover,.postit-display-menu button.active{background:var(--primary-soft);color:var(--primary)}.postit-display-menu hr{border:0;border-top:1px solid var(--line);margin:5px 0}
.media-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:18px}.media-toolbar input{flex:1}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.media-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow-sm)}.media-preview{height:150px;background:var(--surface-2);display:flex;align-items:center;justify-content:center}.media-preview img,.media-preview video{width:100%;height:100%;object-fit:cover}.media-preview svg{width:44px;height:44px;color:var(--muted)}.media-meta{padding:12px;display:flex;flex-direction:column;gap:3px}.media-meta strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.media-meta small{color:var(--muted)}.media-actions{display:flex;gap:6px;padding:0 12px 12px;flex-wrap:wrap}
@media(max-width:900px){.global-search-wrap{order:3;max-width:none;width:100%;margin:8px 0 0}.topbar{flex-wrap:wrap;height:auto}.postit-toolbar{grid-template-columns:1fr!important}.postit-color-palette{flex-wrap:wrap}}

/* V5.2 — barre Post-it simplifiée */
#view-postits .postit-toolbar{
  position:sticky;top:0;z-index:18;
  grid-template-columns:minmax(260px,1fr) minmax(190px,240px) auto auto auto auto!important;
  align-items:end;padding:12px 0;background:var(--bg);
}
#view-postits .postit-toolbar .field input,
#view-postits .postit-toolbar .field select{height:42px;min-height:42px;}
#view-postits .postit-board-filter select{width:100%;}
#view-postits .postit-toolbar-action{height:42px;min-height:42px;align-self:end;}
#view-postits .postit-zoom-controls{min-height:42px;}
#view-postits .postit-color-palette,#view-postits .postit-display-menu-wrap{display:none!important;}
@media(max-width:1100px){#view-postits .postit-toolbar{grid-template-columns:1fr 1fr auto!important;}}
@media(max-width:700px){#view-postits .postit-toolbar{grid-template-columns:1fr!important;}#view-postits .postit-toolbar-action{width:100%;justify-content:center;}}

/* ===== V5.3 — harmonisation header web et filtres Post-it ===== */
.topbar-more-menu > .btn,
.topbar-actions > .btn {
  min-height: 40px;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
  white-space: nowrap;
}
.topbar-more-menu > .btn > svg,
.topbar-more-menu > .btn > [data-fui],
.topbar-actions > .btn > svg,
.topbar-actions > .btn > [data-fui] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
#btn-app-update {
  min-width: 190px;
}
#btn-app-update::first-letter {
  font-size: 1rem;
}
#theme-toggle {
  min-width: 132px;
}

#view-postits .postit-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 440px) 220px auto auto auto minmax(0, 1fr) !important;
  justify-content: start;
  column-gap: 10px;
  row-gap: 10px;
}
#view-postits .postit-toolbar .field {
  width: 100%;
  min-width: 0;
}
#view-postits .postit-count {
  justify-self: end;
  align-self: center;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  #view-postits .postit-toolbar {
    grid-template-columns: minmax(260px, 1fr) 220px auto !important;
  }
  #view-postits .postit-zoom-controls,
  #view-postits .postit-count {
    grid-column: auto;
  }
}
@media (max-width: 760px) {
  #view-postits .postit-toolbar {
    grid-template-columns: 1fr !important;
  }
  #view-postits .postit-count {
    justify-self: start;
  }
}

/* ===== V5.4 — header sans troncature et barre Post-it opaque ===== */
/* Le menu secondaire passe en panneau déroulant plus tôt afin de conserver
   Déconnexion entièrement visible sur les écrans web de largeur intermédiaire. */
@media (max-width: 1420px) {
  .btn.topbar-more-trigger { display: inline-flex; }
  .topbar-more-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: max-content;
    min-width: 260px;
    max-width: min(360px, calc(100vw - 28px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
    z-index: 1300;
  }
  .topbar-more-menu.open { display: flex; }
  .topbar-more-menu > .btn {
    width: 100%;
    min-width: 0 !important;
    justify-content: flex-start;
    overflow: visible;
  }
  .topbar-more-menu > .btn span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }
  .topbar-menu-divider { display: block; height: 1px; background: var(--line); margin: 4px 2px; }
  .topbar-menu-user { display: block; padding: 0 2px; }
  #btn-app-update,
  #theme-toggle,
  #btn-logout { min-width: 0; }
}

/* La barre flottante masque complètement les Post-it qui passent dessous. */
#view-postits .postit-toolbar {
  background: #ffffff !important;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(20, 30, 45, .14);
  isolation: isolate;
}
html[data-theme="dark"] #view-postits .postit-toolbar {
  background: #050708 !important;
  border-color: #26323a;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .48);
}

/* ===== V5.5 — header robuste sur écrans haute densité ===== */
/* Les actions secondaires restent toujours dans le menu déroulant :
   le comportement ne dépend plus de la largeur CSS ou du facteur d'échelle. */
.btn.topbar-more-trigger {
  display: inline-flex !important;
  width: 40px;
  min-width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.topbar-actions {
  flex: 0 0 auto;
  min-width: 0;
}
.topbar-more-wrap {
  position: relative;
  flex: 0 0 auto;
}
.topbar-more-menu {
  display: none !important;
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: max-content !important;
  min-width: 270px !important;
  max-width: min(380px, calc(100vw - 24px)) !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 10px !important;
  box-shadow: var(--shadow) !important;
  z-index: 1400 !important;
}
.topbar-more-menu.open {
  display: flex !important;
}
.topbar-more-menu > .btn {
  width: 100% !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  overflow: visible !important;
}
.topbar-more-menu > .btn > span:last-child {
  display: inline !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
#btn-logout {
  min-width: 0 !important;
  width: 100% !important;
}

/* Le header peut réduire la recherche avant de toucher aux actions principales. */
.global-search-wrap {
  min-width: 180px;
}
@media (max-width: 1180px) {
  .brand-copy p { display: none; }
  .global-search-wrap { max-width: 300px; }
}
@media (max-width: 980px) {
  .global-search-wrap {
    order: 3;
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }
  .topbar { flex-wrap: wrap; height: auto; }
}

/* ===== V5.16 — Espacements uniformes du tableau de bord ===== */
#view-dashboard {
  --dashboard-section-gap: 22px;
  --dashboard-heading-gap: 10px;
}

/* Les blocs de contenu du tableau de bord ne créent plus de marge propre
   différente : l'espacement est piloté par les en-têtes de section. */
#view-dashboard .notes-board,
#view-dashboard .suivi-board,
#view-dashboard .priority-board,
#view-dashboard .status-board {
  margin-top: 0;
  margin-bottom: 0;
}

/* Lorsqu'au moins un Post-it / une note est affiché, l'en-tête « À suivre »
   retrouve exactement le même espacement vertical que les widgets suivants. */
#view-dashboard #notes-board:not(.hidden) + .page-head {
  margin-top: var(--dashboard-section-gap) !important;
  margin-bottom: var(--dashboard-heading-gap) !important;
}

/* Quand aucun Post-it n'est affiché, on conserve le rythme initial après les KPI. */
#view-dashboard #notes-board.hidden + .page-head {
  margin-top: 0 !important;
  margin-bottom: var(--dashboard-heading-gap) !important;
}

/* Hauteur et alignement cohérents des cartes d'un même widget. */
#view-dashboard .notes-board,
#view-dashboard .suivi-board {
  align-items: stretch;
}
#view-dashboard .note-card,
#view-dashboard .suivi-card {
  height: 100%;
}

/* Rythme commun pour les sections suivantes, y compris sur petits écrans. */
#view-dashboard .suivi-board + .page-head,
#view-dashboard .priority-board + .page-head {
  margin-top: var(--dashboard-section-gap) !important;
  margin-bottom: var(--dashboard-heading-gap) !important;
}

/* ============================================================
   V5.21 — Explorateur documentaire CSE / CSEC
   ============================================================ */
.page-head-actions { display:flex; gap:10px; flex-wrap:wrap; }
.cse-subnav {
  display:flex; gap:8px; padding:8px; margin-bottom:16px;
  background:var(--surface); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 6px 18px rgba(20,59,74,.05); overflow-x:auto;
}
.cse-subtab { flex:0 0 auto; background:transparent; border-color:transparent; color:var(--muted); }
.cse-subtab.active { color:#fff; background:var(--brand-orange); border-color:var(--brand-orange); box-shadow:0 6px 16px rgba(240,100,43,.25); }
.cse-panel { display:none; }
.cse-panel.active { display:block; }
.cse-kpi-grid { grid-template-columns:repeat(5,minmax(140px,1fr)); }
.cse-kpi-help { color:var(--muted); font-size:.74rem; margin-top:5px; line-height:1.3; }
.cse-dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.cse-card {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; box-shadow:0 6px 20px rgba(20,59,74,.06); min-width:0;
}
.cse-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.cse-card-head h3,.cse-settings-intro h3 { margin:0; color:var(--ink); font-size:1rem; }
.cse-card-head p,.cse-settings-intro p { margin:4px 0 0; color:var(--muted); font-size:.82rem; }
.cse-bars { display:grid; gap:10px; }
.cse-bar-row { display:grid; grid-template-columns:minmax(100px,160px) 1fr 34px; gap:10px; align-items:center; }
.cse-bar-row > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; font-weight:700; }
.cse-bar-track { height:11px; background:var(--brand-orange-soft); border-radius:999px; overflow:hidden; }
.cse-bar-track i { display:block; height:100%; background:linear-gradient(90deg,var(--brand-orange),var(--purple)); border-radius:999px; }
.cse-bar-row strong { text-align:right; font-size:.8rem; }
.cse-toolbar {
  display:grid; grid-template-columns:minmax(220px,2fr) repeat(4,minmax(130px,1fr)) auto;
  gap:10px; align-items:end; background:var(--surface); border:1px solid var(--line);
  border-radius:16px; padding:12px; margin-bottom:12px; box-shadow:0 5px 16px rgba(20,59,74,.04);
}
.cse-document-toolbar { grid-template-columns:minmax(220px,2fr) repeat(4,minmax(120px,1fr)) auto; }
.cse-search-field { min-width:0; }
.cse-clear-button { min-height:42px; }
.cse-table { width:100%; min-width:980px; border-collapse:separate; border-spacing:0; }
.cse-table th,.cse-table td { padding:12px 11px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.cse-table th { color:var(--muted); font-size:.74rem; text-transform:uppercase; letter-spacing:.04em; background:var(--surface); }
.cse-table tbody tr { transition:background .15s ease; }
.cse-table tbody tr:hover { background:var(--brand-orange-soft); }
.cse-table td small { display:block; color:var(--muted); margin-top:4px; max-width:440px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cse-sort-head { border:0; background:transparent; color:inherit; padding:0; font:inherit; text-transform:inherit; letter-spacing:inherit; font-weight:inherit; }
.cse-sort-head span { color:var(--brand-orange); margin-left:4px; }
.cse-subject-link { border:0; background:transparent; padding:0; color:var(--ink); font-weight:850; text-align:left; max-width:430px; }
.cse-subject-link:hover { color:var(--brand-orange-dark); text-decoration:underline; }
.cse-instance-pill,.cse-doc-category {
  display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px;
  background:var(--brand-orange-soft); color:var(--brand-orange-dark); font-size:.72rem; font-weight:850;
}
.cse-status { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:.72rem; font-weight:850; white-space:nowrap; }
.cse-status-todo { background:#fee2e2; color:#991b1b; }
.cse-status-warning { background:#fef3c7; color:#92400e; }
.cse-status-progress { background:#dbeafe; color:#1e40af; }
.cse-status-done { background:#dcfce7; color:#166534; }
html[data-theme="dark"] .cse-status-todo { background:#4a1d22; color:#fecaca; }
html[data-theme="dark"] .cse-status-warning { background:#4b3515; color:#fde68a; }
html[data-theme="dark"] .cse-status-progress { background:#163761; color:#bfdbfe; }
html[data-theme="dark"] .cse-status-done { background:#153d2a; color:#bbf7d0; }
.cse-doc-count { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); border-radius:10px; padding:6px 9px; font-weight:800; }
.cse-archive-summary { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:2px 2px 14px; font-weight:750; }
.cse-archive-summary-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.cse-file-explorer {
  display:grid; grid-template-columns:290px minmax(0,1fr); min-height:590px;
  border:1px solid var(--line); border-radius:18px; overflow:hidden; background:var(--surface);
  box-shadow:0 8px 24px rgba(20,59,74,.06);
}
.cse-folder-sidebar { min-width:0; border-right:1px solid var(--line); background:var(--surface-2); display:flex; flex-direction:column; }
.cse-folder-sidebar-head { padding:14px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cse-folder-sidebar-head > div { display:flex; align-items:center; gap:8px; color:var(--ink); }
.cse-folder-sidebar-head .fui-icon { color:var(--brand-orange); }
.cse-folder-sidebar-head small { color:var(--muted); }
.cse-folder-tree { padding:8px; overflow:auto; flex:1; min-height:0; }
.cse-tree-row { display:grid; grid-template-columns:24px minmax(0,1fr); align-items:center; min-height:36px; padding-left:calc(var(--tree-depth) * 16px); border-radius:10px; }
.cse-tree-row:hover { background:var(--surface); }
.cse-tree-row.selected { background:var(--brand-orange-soft); color:var(--brand-orange-dark); }
.cse-tree-toggle,.cse-tree-name { border:0; background:transparent; color:inherit; min-width:0; }
.cse-tree-toggle { width:24px; height:30px; padding:6px; display:grid; place-items:center; }
.cse-tree-toggle .fui-icon { width:13px; height:13px; transition:transform .15s ease; }
.cse-tree-row.expanded .cse-tree-toggle .fui-icon { transform:rotate(90deg); }
.cse-tree-toggle.is-leaf { pointer-events:none; }
.cse-tree-name { display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:7px; align-items:center; padding:7px 8px 7px 2px; text-align:left; font-size:.79rem; font-weight:750; }
.cse-tree-name > span:nth-child(2) { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cse-tree-name .fui-icon { color:var(--brand-orange); width:18px; height:18px; }
.cse-tree-name small { color:var(--muted); font-size:.68rem; font-weight:800; }
.cse-tree-row.selected .cse-tree-name small { color:inherit; opacity:.75; }
.cse-file-pane { min-width:0; display:flex; flex-direction:column; background:var(--surface); }
.cse-file-pane-head { min-height:53px; padding:10px 14px; border-bottom:1px solid var(--line); display:flex; align-items:center; }
.cse-folder-breadcrumb { display:flex; align-items:center; gap:4px; overflow:auto; min-width:0; }
.cse-folder-breadcrumb button { border:0; background:transparent; color:var(--ink-2); padding:6px 7px; border-radius:8px; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:.8rem; font-weight:800; }
.cse-folder-breadcrumb button:hover { background:var(--surface-2); color:var(--brand-orange-dark); }
.cse-folder-breadcrumb button[aria-current="page"] { color:var(--ink); }
.cse-folder-breadcrumb .fui-icon { width:16px; height:16px; }
.cse-breadcrumb-separator { color:var(--muted); }
.cse-document-archive { display:block; padding:14px; overflow:auto; min-height:0; }
.cse-current-folder { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:13px; }
.cse-current-folder > div { display:flex; align-items:center; gap:10px; min-width:0; }
.cse-current-folder > div > .fui-icon { width:34px; height:34px; color:var(--brand-orange); flex:0 0 auto; }
.cse-current-folder h3 { margin:0; color:var(--ink); font-size:1.05rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cse-current-folder p { margin:3px 0 0; color:var(--muted); font-size:.76rem; }
.cse-explorer-folders { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:9px; margin-bottom:16px; }
.cse-explorer-folder { border:1px solid var(--line); background:var(--surface-2); color:var(--ink-2); border-radius:12px; padding:11px; display:grid; grid-template-columns:30px minmax(0,1fr) 18px; align-items:center; gap:9px; text-align:left; }
.cse-explorer-folder:hover { border-color:var(--brand-orange); background:var(--brand-orange-soft); transform:translateY(-1px); }
.cse-explorer-folder-icon { color:var(--brand-orange); }
.cse-explorer-folder-icon .fui-icon,.cse-explorer-folder-arrow .fui-icon { width:22px; height:22px; }
.cse-explorer-folder-arrow { color:var(--muted); }
.cse-explorer-folder > span:nth-child(2) { min-width:0; display:grid; gap:3px; }
.cse-explorer-folder strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cse-explorer-folder small { color:var(--muted); font-size:.72rem; }
.cse-files-section h4 { margin:0 0 8px; color:var(--ink); font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
.cse-files-section h4 span { color:var(--muted); margin-left:5px; }
.cse-file-list { border:1px solid var(--line); border-radius:13px; overflow:hidden; }
.cse-file-list-head,.cse-file-row { display:grid; grid-template-columns:minmax(260px,2fr) minmax(130px,.85fr) 115px 80px 120px; gap:10px; align-items:center; }
.cse-file-list-head { padding:9px 11px; background:var(--surface-2); color:var(--muted); font-size:.67rem; font-weight:900; text-transform:uppercase; letter-spacing:.045em; border-bottom:1px solid var(--line); }
.cse-file-row { padding:9px 11px; border-bottom:1px solid var(--line); color:var(--ink-2); font-size:.79rem; }
.cse-file-row:last-child { border-bottom:0; }
.cse-file-row:hover { background:var(--brand-orange-soft); }
.cse-file-name { min-width:0; display:grid; grid-template-columns:38px minmax(0,1fr); gap:9px; align-items:center; }
.cse-file-name > button { border:0; background:transparent; color:inherit; text-align:left; padding:0; min-width:0; display:grid; gap:3px; }
.cse-file-name strong,.cse-file-name small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cse-file-name small { color:var(--muted); font-size:.7rem; }
.cse-file-thumb,.cse-file-type { width:38px; height:38px; border:1px solid var(--line); border-radius:9px; overflow:hidden; display:grid; place-items:center; background:var(--surface); color:var(--brand-orange-dark); font-size:.62rem; font-weight:900; }
.cse-file-thumb img { width:100%; height:100%; object-fit:cover; }
.cse-file-type-pdf { color:#b42318; background:#fff1f0; }
html[data-theme="dark"] .cse-file-type-pdf { background:#401f20; color:#fecaca; }
.cse-file-actions { display:flex; justify-content:flex-end; gap:5px; }
.cse-document-archive { display:block; }
.cse-archive-group { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:14px; box-shadow:0 6px 20px rgba(20,59,74,.05); }
.cse-archive-heading { display:flex; justify-content:space-between; margin-bottom:12px; }
.cse-archive-heading div { display:flex; align-items:baseline; gap:9px; }
.cse-archive-heading strong { color:var(--ink); font-size:1rem; text-transform:capitalize; }
.cse-archive-heading span { color:var(--muted); font-size:.78rem; }
.cse-document-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.cse-document-card { border:1px solid var(--line); border-radius:15px; overflow:hidden; background:var(--surface-2); display:flex; flex-direction:column; min-width:0; }
.cse-document-preview { height:142px; border:0; border-bottom:1px solid var(--line); background:linear-gradient(145deg,var(--brand-orange-soft),var(--surface)); color:var(--brand-orange-dark); display:grid; place-items:center; align-content:center; gap:6px; }
.cse-document-preview img { width:100%; height:100%; object-fit:cover; }
.cse-document-preview .fui-icon { width:42px; height:42px; }
.cse-document-preview b { font-size:.75rem; letter-spacing:.08em; }
.cse-document-meta { padding:12px; display:grid; gap:6px; min-width:0; flex:1; }
.cse-document-meta strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cse-document-meta small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cse-linked-subject { color:var(--purple)!important; }
.cse-document-actions { display:flex; gap:6px; padding:0 10px 10px; align-items:center; }
.cse-document-actions .btn:first-child { flex:1; }
.cse-settings-intro { margin-bottom:14px; }
.cse-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.cse-settings-card { background:var(--surface); border:1px solid var(--line); border-radius:17px; padding:14px; box-shadow:0 6px 20px rgba(20,59,74,.05); }
.cse-settings-card h3 { margin:0 0 10px; color:var(--ink); }
.cse-ref-add { display:grid; grid-template-columns:1fr auto; gap:8px; margin-bottom:10px; }
.cse-ref-add input { min-width:0; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); border-radius:11px; padding:9px 10px; }
.cse-ref-list { display:grid; gap:7px; max-height:310px; overflow:auto; }
.cse-ref-row { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); }
.cse-ref-row > span { font-size:.83rem; font-weight:750; overflow-wrap:anywhere; }
.cse-ref-row > div { display:flex; gap:5px; }
.cse-path-preview {
  align-self:stretch; border:1px solid var(--brand-orange-line); border-radius:13px;
  padding:10px 12px; background:var(--brand-orange-soft); display:grid; gap:3px;
}
.cse-path-preview > span { color:var(--brand-orange-dark); font-size:.69rem; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.cse-path-preview > strong { color:var(--ink); font-size:.82rem; overflow-wrap:anywhere; }
.cse-path-preview > small { color:var(--muted); font-size:.72rem; line-height:1.35; }
.cse-document-dialog select:disabled,.cse-document-dialog input:disabled,
#cse-item-dialog select:disabled { opacity:.75; cursor:not-allowed; background:var(--surface-2); }
.cse-dropzone { border:2px dashed var(--line); border-radius:15px; padding:14px; background:var(--surface-2); transition:.15s ease; }
.cse-dropzone.dragover { border-color:var(--brand-orange); background:var(--brand-orange-soft); }
.cse-dropzone p { margin:7px 0 0; color:var(--muted); font-size:.78rem; }
.cse-selected-files { display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; }
.cse-selected-files > span { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:6px 8px; font-size:.76rem; }
.cse-upload-progress { position:relative; height:34px; margin-top:14px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface-2); }
.cse-upload-progress > div { position:absolute; inset:0 auto 0 0; width:0; background:linear-gradient(90deg,var(--brand-orange-soft),rgba(139,92,246,.22)); transition:width .2s; }
.cse-upload-progress > span { position:relative; z-index:1; display:flex; align-items:center; height:100%; padding:0 10px; font-size:.76rem; font-weight:750; }
.cse-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.cse-detail-grid article { border:1px solid var(--line); background:var(--surface-2); border-radius:13px; padding:12px; }
.cse-detail-grid article.span-2 { grid-column:1/-1; }
.cse-detail-grid article > span { display:block; color:var(--muted); font-size:.7rem; font-weight:850; text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.cse-detail-grid p { margin:0; line-height:1.55; }
.cse-detail-documents { margin-top:16px; }
.cse-detail-documents h3 { color:var(--ink); }
.cse-detail-documents > button { width:100%; display:flex; align-items:center; gap:10px; text-align:left; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); border-radius:12px; padding:10px; margin-bottom:7px; }
.cse-detail-documents > button:hover { border-color:var(--brand-orange); background:var(--brand-orange-soft); }
.cse-detail-documents > button > span:last-child { display:grid; gap:3px; }
.cse-detail-documents small { color:var(--muted); }
.cse-viewer-dialog { width:min(1050px,96vw); }
.cse-viewer-body { min-height:60vh; display:grid; place-items:center; background:#111820; }
.cse-viewer-body img { max-width:100%; max-height:70vh; object-fit:contain; }
.cse-viewer-body iframe { width:100%; height:70vh; border:0; background:#fff; }
.cse-no-preview { text-align:center; color:#fff; max-width:500px; }
.cse-no-preview .fui-icon { width:56px; height:56px; }
.cse-no-preview h3 { margin:12px 0 5px; }
.cse-no-preview p { color:#cbd5e1; line-height:1.5; }
html[data-theme="dark"] .cse-card,
html[data-theme="dark"] .cse-subnav,
html[data-theme="dark"] .cse-toolbar,
html[data-theme="dark"] .cse-archive-group,
html[data-theme="dark"] .cse-settings-card { background:var(--surface); }
html[data-theme="dark"] .cse-document-card { background:var(--surface-2); }

@media (max-width:1050px) {
  .cse-file-explorer { grid-template-columns:245px minmax(0,1fr); }
  .cse-file-list-head,.cse-file-row { grid-template-columns:minmax(240px,2fr) minmax(120px,1fr) 105px 110px; }
  .cse-file-list-head > span:nth-child(4),.cse-file-row > span:nth-child(4) { display:none; }
}
@media (max-width:780px) {
  .cse-file-explorer { grid-template-columns:1fr; }
  .cse-folder-sidebar { border-right:0; border-bottom:1px solid var(--line); max-height:270px; }
  .cse-file-list-head { display:none; }
  .cse-file-row { grid-template-columns:minmax(0,1fr) auto; align-items:start; }
  .cse-file-row > span { display:none; }
  .cse-file-actions { grid-column:2; grid-row:1; }
  .cse-explorer-folders { grid-template-columns:1fr; }
}
@media (max-width:1150px) {
  .cse-kpi-grid { grid-template-columns:repeat(3,minmax(130px,1fr)); }
  .cse-toolbar,.cse-document-toolbar { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cse-search-field { grid-column:span 2; }
  .cse-clear-button { align-self:end; }
}
@media (max-width:780px) {
  .cse-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cse-dashboard-grid,.cse-settings-grid { grid-template-columns:1fr; }
  .cse-toolbar,.cse-document-toolbar { grid-template-columns:1fr 1fr; }
  .cse-search-field { grid-column:1/-1; }
  .cse-detail-grid { grid-template-columns:1fr; }
  .cse-detail-grid article.span-2 { grid-column:auto; }
}
@media (max-width:520px) {
  .cse-kpi-grid,.cse-toolbar,.cse-document-toolbar { grid-template-columns:1fr; }
  .cse-search-field { grid-column:auto; }
  .cse-document-grid { grid-template-columns:1fr; }
  .cse-subnav { padding:6px; }
  .cse-subtab { min-height:36px; padding:7px 10px; }
}

/* ============================================================
   V5.22 — Médiathèque unifiée en explorateur de fichiers
   ============================================================ */
.media-explorer-toolbar {
  display:grid;
  grid-template-columns:minmax(280px,1fr) minmax(170px,220px) auto auto;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
}
.media-explorer-toolbar input,
.media-explorer-toolbar select { min-width:0; }
.media-explorer-toolbar #media-count { text-align:right; white-space:nowrap; }
.media-file-explorer { min-height:620px; }
.media-file-pane .cse-current-folder { margin-bottom:14px; }
.media-file-list .cse-file-name strong { color:var(--ink); }
.media-file-list .cse-file-name button:hover strong { color:var(--brand-orange-dark); }
.cse-viewer-body video { max-width:100%; max-height:70vh; background:#000; }

@media (max-width:980px) {
  .media-explorer-toolbar { grid-template-columns:minmax(0,1fr) minmax(155px,210px) auto; }
  .media-explorer-toolbar #media-count { grid-column:1/-1; text-align:left; }
}
@media (max-width:620px) {
  .media-explorer-toolbar { grid-template-columns:1fr; }
  .media-explorer-toolbar #media-count { grid-column:auto; }
  .media-file-explorer { min-height:0; }
}

/* ===== CFDT Suite — identité V6 ===== */
:root {
  --brand-orange: #f45b0b;
  --brand-orange-dark: #d94800;
  --brand-orange-soft: #fff1e8;
  --ink: #07152d;
  --ink-2: #101828;
  --muted: #667085;
  --line: #e5e9f0;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --shadow: 0 12px 34px rgba(7, 21, 45, .09);
}
html[data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #f3f5f8;
  --muted: #aab4c4;
  --line: #2c3a52;
  --surface: #111c31;
  --surface-2: #07152d;
  --brand-orange-soft: #3b2116;
}
.topbar {
  background: #07152d;
  border-bottom-color: rgba(255,255,255,.1);
  box-shadow: 0 8px 28px rgba(7,21,45,.18);
}
.topbar::before { width: 5px; background: linear-gradient(180deg,#ff7a00,#f04b00); }
.topbar .brand-copy h1, .topbar .brand-copy p { color: #fff; }
.topbar .brand-copy p { opacity: .7; }
.brand-logo {
  width: 52px; height: 52px; padding: 3px; overflow: hidden;
  background: #fff; border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-name-cfdt { color: #f45b0b; font-weight: 900; }
.topbar .brand-name-cfdt { color: #ff6b1a; }
.brand-name-suite { color: #07152d; font-weight: 900; }
.topbar .brand-name-suite { color: #fff; }
.version-badge { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.16); }
.topbar .global-search-wrap { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); }
.topbar .global-search-wrap input, .topbar .global-search-wrap [data-fui] { color: #fff; }
.topbar .global-search-wrap input::placeholder { color: rgba(255,255,255,.55); }
.topbar-actions > .btn, .topbar .topbar-more-trigger { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
.topbar-actions > .btn.btn-primary { background: #f45b0b; border-color: #f45b0b; }
.tabs { box-shadow: 0 3px 12px rgba(7,21,45,.05); }
.tab-button.active { background: #f45b0b; color: #fff; }
.tab-button:hover { background: var(--brand-orange-soft); color: var(--brand-orange-dark); }
.login-body { background: radial-gradient(circle at 18% 18%, #fff0e6 0, transparent 28%), linear-gradient(135deg,#f7f8fb 0%,#eef1f6 100%); }
.login-card { border-top: 5px solid #f45b0b; }
.login-round-logo { width:66px; height:66px; object-fit:contain; flex:0 0 auto; filter:drop-shadow(0 8px 14px rgba(7,21,45,.12)); }
.login-brand h1 { margin: 0; }
html[data-theme="dark"] .brand-name-suite { color: #fff; }

/* ===== CFDT Suite V6.1 — refonte globale et tableau de bord ===== */
@media (min-width: 981px) {
  .app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px minmax(0,1fr);
    grid-template-rows: 72px minmax(0,1fr);
    grid-template-areas: "sidebar header" "sidebar main";
  }
  .topbar { grid-area: header; min-height: 72px; padding: 10px 22px; }
  .topbar .brand { display: none; }
  .tabs {
    grid-area: sidebar; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 92px 14px 18px;
    background: var(--surface); border-right: 1px solid var(--line); border-bottom: 0;
  }
  .tabs::before {
    content: ""; position: absolute; top: 18px; left: 18px; right: 18px; height: 48px;
    background: url('icons/cfdt-suite-logo.svg') left center / contain no-repeat;
  }
  .tab-button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 13px; border-radius: 10px; }
  .tab-button.active { background: linear-gradient(135deg,#ff6b00,#f4510b); color:#fff; box-shadow:0 8px 18px rgba(244,91,11,.24); }
  .main { grid-area: main; overflow: auto; min-width: 0; }
}
.topbar { background: var(--surface); border-bottom:1px solid var(--line); box-shadow:none; }
.topbar::before { display:none; }
.topbar .global-search-wrap { margin-left: 0; max-width: 520px; background:var(--surface-2); border-color:var(--line); }
.topbar .global-search-wrap input, .topbar .global-search-wrap [data-fui] { color:var(--ink-2); }
.topbar .global-search-wrap input::placeholder { color:var(--muted); }
.topbar-actions > .btn, .topbar .topbar-more-trigger { background:var(--surface); color:var(--ink-2); border-color:var(--line); }
.topbar-actions > .btn.btn-primary { background:var(--brand-orange); color:#fff; border-color:var(--brand-orange); }
.dashboard-home { max-width: 1480px; padding: 22px 26px 34px; }
.dashboard-welcome { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.dashboard-welcome h2 { margin:0; color:var(--ink-2); font-size:1.55rem; }
.dashboard-welcome p { margin:5px 0 0; color:var(--muted); }
.dashboard-date { border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:10px 14px; font-weight:800; box-shadow:0 4px 14px rgba(7,21,45,.05); }
.dashboard-toolbar { min-height:38px; display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-bottom:10px; }
.dashboard-layout { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; align-items:start; }
.dashboard-widget { min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:0 6px 18px rgba(7,21,45,.055); padding:14px; position:relative; overflow:hidden; }
.dashboard-widget-resized { overflow:auto; }
.dashboard-widget-resizing { user-select:none; box-shadow:0 10px 28px rgba(7,21,45,.16); z-index:6; }
.dashboard-widget-resize-handle {
  position:absolute; right:2px; bottom:2px; width:18px; height:18px; cursor:nwse-resize;
  touch-action:none; opacity:0; transition:opacity .12s ease; z-index:4;
}
.dashboard-widget-resize-handle::after {
  content:""; position:absolute; right:4px; bottom:4px; width:9px; height:9px;
  border-right:2.5px solid var(--muted); border-bottom:2.5px solid var(--muted); border-radius:0 0 2px 0; opacity:.6;
}
.dashboard-widget:hover .dashboard-widget-resize-handle,
.dashboard-widget-resizing .dashboard-widget-resize-handle { opacity:1; }
.dashboard-layout.customizing .dashboard-widget-resize-handle { opacity:1; }
.dashboard-widget-wide { grid-column:1/-1; }
.dashboard-widget-span-2 { grid-column:span 2; }
.dashboard-widget-head { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:32px; margin-bottom:10px; }
.dashboard-widget-head h3 { margin:0; color:var(--ink-2); font-size:1rem; }
.dashboard-widget-head p { margin:3px 0 0; color:var(--muted); font-size:.76rem; }
.dashboard-widget-toggle { display:none; width:30px; height:30px; border:0; border-radius:8px; background:var(--surface-2); color:var(--muted); }
.dashboard-layout.customizing .dashboard-widget { outline:2px dashed rgba(244,91,11,.25); cursor:grab; }
.dashboard-layout.customizing .dashboard-widget:active { cursor:grabbing; }
.dashboard-layout.customizing .dashboard-widget-toggle { display:inline-grid; place-items:center; }
.dashboard-layout.customizing .dashboard-widget.dragging { opacity:.45; }
.dashboard-layout.customizing .dashboard-widget.drag-over { outline:2px solid var(--brand-orange); }
.dashboard-widget.is-hidden { display:none; }
.dashboard-layout.customizing .dashboard-widget.is-hidden { display:block; opacity:.42; filter:grayscale(.6); }
.dashboard-layout.customizing .dashboard-widget.is-hidden::after { content:"Widget masqué"; display:block; text-align:center; color:var(--muted); font-size:.75rem; margin-top:8px; }
.dashboard-widget .kpi-grid { margin:0; grid-template-columns:repeat(6,minmax(120px,1fr)); }
.kpi { position:relative; overflow:hidden; box-shadow:none; border-radius:14px; }
.kpi::before { content:""; position:absolute; width:42px; height:42px; right:12px; top:12px; border-radius:12px; background:var(--brand-orange-soft); opacity:.85; }
.dashboard-compact-list { display:grid; gap:7px; }
.dashboard-list-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; padding:9px 2px; border-bottom:1px solid var(--line); }
.dashboard-list-row:last-child { border-bottom:0; }
.dashboard-list-date { min-width:46px; color:var(--brand-orange); text-align:center; font-weight:900; line-height:1.05; }
.dashboard-list-date small { display:block; font-size:.62rem; text-transform:uppercase; }
.dashboard-list-main strong { display:block; color:var(--ink-2); font-size:.84rem; }
.dashboard-list-main small { display:block; color:var(--muted); margin-top:3px; font-size:.72rem; }
.dashboard-list-meta { color:var(--muted); font-size:.7rem; white-space:nowrap; }
.dashboard-compact-board { grid-template-columns:1fr; }
.dashboard-compact-board .suivi-card:nth-child(n+5) { display:none; }
.dashboard-documents { display:grid; gap:0; }
.dashboard-document-row { display:grid; grid-template-columns:38px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid var(--line); }
.dashboard-document-row:last-child { border-bottom:0; }
.dashboard-document-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:#fff1e8; color:var(--brand-orange); font-size:.7rem; font-weight:900; }
.dashboard-document-row strong { display:block; font-size:.82rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-document-row small { display:block; color:var(--muted); margin-top:2px; font-size:.69rem; }
.dashboard-document-row time,.dashboard-document-row em { color:var(--muted); font-style:normal; font-size:.68rem; white-space:nowrap; }
.dashboard-quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.dashboard-quick-actions .quicklink-tile { position:relative; border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:12px 8px; display:grid; gap:7px; justify-items:center; color:var(--ink-2); font-weight:750; font-size:.75rem; }
.dashboard-quick-actions .quicklink-tile:hover { border-color:var(--brand-orange); transform:translateY(-1px); }
.dashboard-quick-actions .quicklink-tile span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.quicklink-remove { position:absolute; top:4px; right:4px; width:20px; height:20px; display:none; align-items:center; justify-content:center; border:0; border-radius:50%; background:var(--surface-2); color:var(--muted); }
.dashboard-quick-actions .quicklink-tile:hover .quicklink-remove { display:inline-flex; }
.quicklink-target-choice { display:flex; gap:16px; font-size:.85rem; font-weight:500; color:var(--ink-2); }
.quicklink-target-choice label { display:flex; align-items:center; gap:6px; }
.quicklink-icon-picker { display:grid; grid-template-columns:repeat(8,1fr); gap:6px; }
.quicklink-icon-option { border:1px solid var(--line); background:var(--surface); border-radius:9px; height:36px; display:grid; place-items:center; color:var(--ink-2); }
.quicklink-icon-option.active { border-color:var(--brand-orange); background:var(--brand-orange-soft); color:var(--brand-orange-dark); }
.quick-icon { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; }
.quick-note{background:#fff6d7;color:#d99500}.quick-task{background:#e9f8ef;color:#199650}.quick-media{background:#eef4ff;color:#2563eb}.quick-mailing{background:#e8f8ef;color:#15945d}
.dashboard-widget-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
@media (max-width:1200px){.dashboard-widget-wide,.dashboard-widget-span-2{grid-column:1/-1}.dashboard-widget .kpi-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:980px){.dashboard-layout{grid-template-columns:1fr}.dashboard-widget-wide,.dashboard-widget-span-2{grid-column:auto}.dashboard-widget .kpi-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.dashboard-home{padding:14px}.dashboard-welcome{align-items:flex-start}.dashboard-date{display:none}.dashboard-document-row{grid-template-columns:34px minmax(0,1fr)}.dashboard-document-row time,.dashboard-document-row em{display:none}.dashboard-widget-head-actions{justify-content:space-between;flex-wrap:wrap}}

/* V6.4 — Import CSV des statistiques */
.statistics-main-section{margin-top:0;border-top:0;padding-top:0}/* V6.6 — statistiques uniques {margin:0 0 14px;line-height:1.5}

.statistics-main-section .table-wrap{overflow:visible}

@media(max-width:900px){
  .statistics-main-section .table-wrap{overflow:visible}
}/* V6.7 — remplacement des imports {
  overflow:hidden!important;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow-sm);
}

/* V6.8 — fond et contraste des filtres Statistiques */
:root{
  --border:var(--line);
  --text:var(--ink-2);
  --primary:var(--brand-orange);
  --success:var(--green);
  --warning:var(--amber);
  --danger:var(--red);
  --shadow-sm:0 5px 16px rgba(20,59,74,.07);
  --shadow-lg:0 18px 46px rgba(20,59,74,.17);
}

/* ===== CFDT Suite V6.12 — finitions du tableau de bord et identité ===== */
/* Logo transparent : aucune plaque blanche autour du symbole. */
.brand-logo {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}
.brand-logo img { object-fit: contain; }

@media (min-width: 981px) {
  .tabs::before {
    background-image: url('icons/logo-covea-niort-transparent.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
  }
  html[data-theme="dark"] .tabs::before {
    background-image: url('icons/logo-covea-niort-transparent.png');
  }
}

/* Icônes réellement visibles dans les indicateurs de la vue d’ensemble. */
.dashboard-widget .kpi {
  min-height: 98px;
  padding: 15px 62px 15px 15px;
  background: var(--surface);
}
.dashboard-widget .kpi::before { display: none; }
.kpi-icon {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  z-index: 1;
}
.kpi-icon .fui-icon { width: 22px; height: 22px; }
.kpi-icon-blue { color: #2563eb; background: #eaf1ff; }
.kpi-icon-slate { color: #516473; background: #edf2f5; }
.kpi-icon-amber { color: #c96f08; background: #fff3dd; }
.kpi-icon-orange { color: #e7581c; background: #fff0e8; }
.kpi-icon-red { color: #cf3434; background: #feecec; }
.kpi-icon-green { color: #178c4a; background: #e8f7ef; }
html[data-theme="dark"] .kpi-icon-blue { background: rgba(37,99,235,.19); color: #82aaff; }
html[data-theme="dark"] .kpi-icon-slate { background: rgba(148,163,184,.16); color: #c7d2da; }
html[data-theme="dark"] .kpi-icon-amber { background: rgba(238,139,22,.18); color: #ffc46d; }
html[data-theme="dark"] .kpi-icon-orange { background: rgba(231,88,28,.18); color: #ff9b6d; }
html[data-theme="dark"] .kpi-icon-red { background: rgba(216,59,59,.18); color: #ff8c8c; }
html[data-theme="dark"] .kpi-icon-green { background: rgba(44,167,100,.18); color: #79d9a7; }

/* Listes du dashboard alignées sur les cartes de CFDT Suite. */
.dashboard-compact-list { gap: 9px; }
.dashboard-list-row {
  width: 100%;
  min-height: 60px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  text-align: left;
  box-shadow: 0 2px 8px rgba(7,21,45,.035);
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dashboard-list-row:last-child { border-bottom: 1px solid var(--line); }
.dashboard-list-row:hover {
  border-color: rgba(240,100,43,.6);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(7,21,45,.08);
}
.dashboard-list-row:focus-visible { outline-color: rgba(240,100,43,.35); }
.dashboard-list-date {
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-content: center;
  background: var(--brand-orange-soft);
  color: var(--brand-orange-dark);
}
.dashboard-list-date .fui-icon { width: 20px; height: 20px; }
.dashboard-list-main { min-width: 0; }
.dashboard-list-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-list-meta,
.dashboard-list-row .badge { justify-self: end; }
html[data-theme="dark"] .dashboard-list-row { box-shadow: none; }
html[data-theme="dark"] .dashboard-list-row:hover { box-shadow: 0 7px 18px rgba(0,0,0,.24); }

@media (max-width: 560px) {
  .dashboard-widget .kpi { min-height: 92px; padding-right: 54px; }
  .kpi-icon { width: 36px; height: 36px; right: 10px; top: 10px; }
  .kpi-icon .fui-icon { width: 19px; height: 19px; }
  .dashboard-list-row { grid-template-columns: 44px minmax(0,1fr); }
  .dashboard-list-meta,
  .dashboard-list-row .badge { grid-column: 2; justify-self: start; margin-top: -2px; }
}

/* ===== CFDT Suite V6.14 — icônes des priorités et grille compacte ===== */
.dashboard-layout {
  grid-auto-flow: dense;
}
.dashboard-layout.dashboard-masonry-ready {
  grid-auto-rows: 8px;
}
.dashboard-layout.dashboard-masonry-ready .dashboard-widget {
  align-self: start;
  height: auto;
}
.dashboard-task-icon {
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eaf1ff;
}
.dashboard-task-icon .fui-icon {
  width: 20px;
  height: 20px;
}
.dashboard-task-icon-urgente { color: #cf3434; background: #feecec; }
.dashboard-task-icon-haute { color: #e7581c; background: #fff0e8; }
.dashboard-task-icon-normale { color: #2563eb; background: #eaf1ff; }
.dashboard-task-icon-basse { color: #516473; background: #edf2f5; }
html[data-theme="dark"] .dashboard-task-icon-urgente { color: #ff8c8c; background: rgba(216,59,59,.18); }
html[data-theme="dark"] .dashboard-task-icon-haute { color: #ff9b6d; background: rgba(231,88,28,.18); }
html[data-theme="dark"] .dashboard-task-icon-normale { color: #82aaff; background: rgba(37,99,235,.19); }
html[data-theme="dark"] .dashboard-task-icon-basse { color: #c7d2da; background: rgba(148,163,184,.16); }

@media (max-width: 980px) {
  .dashboard-layout,
  .dashboard-layout.dashboard-masonry-ready {
    grid-auto-rows: auto !important;
  }
  .dashboard-layout .dashboard-widget {
    grid-row-end: auto !important;
  }
}

/* ============================================================
   V6.15 - Réunions & comptes rendus
   ============================================================ */
.meeting-page{display:grid;gap:18px}
.meeting-subnav{display:flex;gap:8px;flex-wrap:wrap;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 24px rgba(20,59,74,.06)}
.meeting-subtab{border-color:transparent;background:transparent}
.meeting-subtab.active{background:var(--brand-orange);border-color:var(--brand-orange);color:#fff}
.meeting-panel{display:none;gap:16px}.meeting-panel.active{display:grid}
.meeting-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.meeting-kpi-grid .kpi{min-height:116px}
.meeting-kpi-help{font-size:.78rem;color:var(--muted)}
.meeting-filterbar{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr)) auto;gap:10px;align-items:end;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(20,59,74,.06)}
.meeting-list{display:grid;gap:10px}
.meeting-list-card{display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 22px rgba(20,59,74,.06);transition:.18s ease}
.meeting-list-card:hover{border-color:rgba(240,100,43,.55);transform:translateY(-1px)}
.meeting-list-date{display:grid;place-items:center;align-content:center;min-height:68px;border-radius:14px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-weight:900;font-size:1.35rem;text-align:center}
.meeting-list-date small{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.05em}
.meeting-list-main{min-width:0}.meeting-list-main h3{margin:0 0 5px;color:var(--ink-2);font-size:1rem}.meeting-list-main p{margin:0;color:var(--muted);font-size:.84rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meeting-list-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.meeting-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:var(--surface-2);border:1px solid var(--line);font-size:.73rem;font-weight:800}.meeting-pill.orange{background:var(--brand-orange-soft);border-color:#ffd4bd;color:var(--brand-orange-dark)}
.meeting-list-actions{display:flex;gap:6px}
.meeting-empty-editor{min-height:360px;display:grid;place-items:center;align-content:center;text-align:center;background:var(--surface);border:1px dashed var(--line);border-radius:20px;color:var(--muted)}.meeting-empty-editor [data-fui]{width:42px;height:42px;color:var(--brand-orange)}.meeting-empty-editor h3{margin:12px 0 4px;color:var(--ink-2)}.meeting-empty-editor p{margin:0}
.meeting-workspace{display:grid;gap:16px}
.meeting-workspace-head{position:sticky;top:0;z-index:4;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 16px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:18px;box-shadow:0 9px 28px rgba(20,59,74,.08)}
.meeting-workspace-head h3{margin:3px 0 2px;font-size:1.2rem}.meeting-workspace-head p{margin:0;color:var(--muted);font-size:.82rem}.meeting-workspace-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.meeting-save-state{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:.7rem;font-weight:850}.meeting-save-state.saving{background:#fef3c7;color:#92400e}.meeting-save-state.error{background:#fee2e2;color:#991b1b}
.btn-meeting-save{border-color:#f36f21;color:#b9490b;background:#fff7ed}.btn-meeting-save.has-changes{background:#f36f21;color:#fff;box-shadow:0 0 0 3px rgba(243,111,33,.18)}html[data-theme="dark"] .btn-meeting-save{background:#332116;color:#ffb083;border-color:#a94b17}html[data-theme="dark"] .btn-meeting-save.has-changes{background:#f36f21;color:#fff}
.meeting-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 24px rgba(20,59,74,.06)}
.meeting-meta-grid .span-2,.meeting-create-grid .span-2{grid-column:span 2}.meeting-meta-grid>.meeting-visit-fields.span-2,.meeting-create-grid>.meeting-create-visit.span-2{grid-column:1/-1}.meeting-meta-grid textarea{resize:vertical}
.meeting-section-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.meeting-section-toolbar h3{margin:0 0 3px}.meeting-section-toolbar p{margin:0;color:var(--muted);font-size:.82rem}
.meeting-sections{display:grid;gap:14px}
.meeting-section-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 24px rgba(20,59,74,.06);overflow:hidden}
.meeting-section-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:12px 14px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.meeting-section-level{display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:5px 9px;border-radius:999px;background:var(--brand-orange);color:#fff;font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.035em}.meeting-section-title{border:0!important;background:transparent!important;padding:6px!important;font-size:1rem!important;font-weight:850;color:var(--ink-2)!important;box-shadow:none!important}.meeting-section-actions{display:flex;gap:6px}.meeting-subsection-card .meeting-section-level{background:color-mix(in srgb,var(--brand-orange) 15%,var(--surface));color:var(--brand-orange);border:1px solid color-mix(in srgb,var(--brand-orange) 38%,var(--line));min-width:82px}.meeting-subsection-card .meeting-section-title{font-size:.94rem!important}.meeting-subsection-card .meeting-section-head{background:color-mix(in srgb,var(--surface-2) 78%,var(--brand-orange) 4%)}
.meeting-note-list{display:grid;gap:9px;padding:12px}.meeting-section-footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:0 12px 12px}.meeting-section-footer .meeting-add-note{margin:0}.meeting-add-subsection{border-color:color-mix(in srgb,var(--brand-orange) 40%,var(--line));color:var(--brand-orange)}.meeting-subsections{display:grid;gap:10px;margin:0 12px 12px 34px;padding-left:14px;border-left:3px solid color-mix(in srgb,var(--brand-orange) 30%,var(--line))}.meeting-subsection-card{border-radius:16px;box-shadow:none;background:color-mix(in srgb,var(--surface) 96%,var(--brand-orange) 4%)}.meeting-subsection-card .meeting-note-list{padding-top:10px}.meeting-subsection-card .meeting-section-footer{padding-bottom:10px}
.meeting-note-card{display:grid;grid-template-columns:145px minmax(0,1fr) 145px 128px 92px auto;gap:9px;align-items:start;padding:10px;border:1px solid var(--line);border-left:5px solid var(--grey);border-radius:14px;background:var(--surface-2)}
.meeting-note-card[data-note-type="Décision"]{border-left-color:var(--brand-orange);background:#fff7f1}.meeting-note-card[data-note-type="Action"]{border-left-color:var(--green);background:#f0fbf5}.meeting-note-card[data-note-type="Question"]{border-left-color:var(--amber);background:#fffaf0}.meeting-note-card[data-note-type="À suivre"]{border-left-color:var(--purple);background:#f7f3ff}.meeting-note-card[data-note-type="Confidentiel"]{border-left-color:var(--red);background:#fff4f4}.meeting-note-card[data-note-type="Information"]{border-left-color:var(--blue);background:#f2f7ff}
.meeting-note-card textarea{min-height:76px;resize:vertical}.meeting-note-complete{min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:12px;font-weight:700}.meeting-note-complete input{width:16px;height:16px;accent-color:var(--brand-orange)}.meeting-note-extra.hidden-field{visibility:hidden;pointer-events:none}.meeting-note-remove{margin-top:2px}.meeting-add-note{justify-self:start}
.meeting-note-kind{display:grid;gap:8px;align-content:start}.meeting-note-label-option{display:flex;align-items:flex-start;gap:7px;padding:7px 8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:.7rem;font-weight:750;line-height:1.25;color:var(--muted)}.meeting-note-label-option input{flex:0 0 auto;width:16px;height:16px;margin:0;accent-color:var(--brand-orange)}
.meeting-rich-editor{min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;transition:border-color .16s,box-shadow .16s}.meeting-rich-editor:focus-within{border-color:var(--brand-orange);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-orange) 16%,transparent)}.meeting-rich-toolbar{display:flex;align-items:center;gap:3px;overflow-x:auto;padding:5px 6px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface-2) 84%,var(--surface))}.meeting-rich-toolbar button{display:grid;place-items:center;flex:0 0 auto;min-width:30px;height:30px;padding:0 6px;border:0;border-radius:7px;background:transparent;color:var(--ink-2);font:800 .78rem/1 Arial,sans-serif;cursor:pointer}.meeting-rich-toolbar button:hover,.meeting-rich-toolbar button:focus-visible{background:var(--brand-orange-soft);color:var(--brand-orange-dark);outline:0}.meeting-rich-toolbar button:nth-child(2){font-style:italic}.meeting-rich-toolbar button:nth-child(3){text-decoration:underline}
.rich-toolbar-sep{flex:0 0 auto;width:1px;height:20px;background:var(--line);margin:0 3px}
.meeting-rich-toolbar .rich-swatch{min-width:20px;width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,0,0,.15);padding:0;font-size:.7rem;color:#7a7a7a;font-weight:900}
.meeting-rich-toolbar .rich-swatch:hover{transform:scale(1.12)}
.meeting-rich-toolbar .rich-swatch-text{border-radius:6px;background:var(--surface);font-weight:900;font-size:.78rem}
.meeting-rich-toolbar .meeting-note-image-button{color:var(--brand-orange)}.meeting-rich-toolbar .meeting-note-image-button svg{width:17px;height:17px}.meeting-note-image-placeholder{display:inline-flex;align-items:center;padding:6px 9px;border-radius:8px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-size:.75rem;font-weight:750}.meeting-note-content[aria-busy="true"]{cursor:progress}
.meeting-note-content{min-height:92px;padding:11px 12px;color:var(--ink-2);font-size:.88rem;line-height:1.5;outline:0;overflow-wrap:anywhere;white-space:normal}.meeting-note-content:empty::before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}.meeting-note-content p,.meeting-note-content div{margin:0 0 .45em}.meeting-note-content p:last-child,.meeting-note-content div:last-child{margin-bottom:0}.meeting-note-content ul,.meeting-note-content ol{margin:.35em 0 .35em 1.4em;padding:0}.meeting-note-content blockquote{margin:.35em 0 .35em 1.2em;padding-left:.8em;border-left:3px solid color-mix(in srgb,var(--brand-orange) 45%,var(--line))}
.meeting-note-content img{display:block;max-width:100%;height:auto;margin:.7rem 0;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px rgba(8,21,47,.12)}
.meeting-documents-card,.meeting-settings-card{display:grid;gap:12px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 24px rgba(20,59,74,.06)}
.meeting-documents{display:grid;gap:8px}.meeting-document-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px 12px;background:var(--surface-2);border:1px solid var(--line);border-radius:13px}.meeting-document-row [data-fui]{color:var(--brand-orange)}.meeting-document-row strong{display:block}.meeting-document-row small{color:var(--muted)}.meeting-document-actions{display:flex;gap:5px}
.meeting-report-list{display:grid;gap:12px}.meeting-report-head{padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:18px}.meeting-report-head h3{margin:0 0 3px}.meeting-report-head p{margin:0;color:var(--muted)}
.meeting-report-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(20,59,74,.06)}.meeting-version-badge{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-weight:900}.meeting-report-card h4{margin:0 0 3px}.meeting-report-card p{margin:0;color:var(--muted);font-size:.82rem}.meeting-report-actions{display:flex;gap:7px;flex-wrap:wrap}
.meeting-type-add{display:grid;grid-template-columns:minmax(180px,1fr) minmax(230px,1fr) auto;gap:8px}.meeting-type-list{display:grid;gap:9px}.meeting-type-row{display:grid;grid-template-columns:minmax(150px,.75fr) minmax(240px,1.25fr) auto;gap:12px;align-items:center;padding:12px 14px;background:var(--surface-2);border:1px solid var(--line);border-radius:15px}.meeting-type-main strong{display:block}.meeting-type-main small{color:var(--muted)}.meeting-type-template{display:grid;gap:5px}.meeting-type-template span{font-size:.72rem;font-weight:800;color:var(--muted)}.meeting-type-template select{width:100%;min-width:0}.meeting-type-actions{display:flex;gap:5px}.field-help{display:block;margin-top:5px;color:var(--muted);font-size:.72rem;line-height:1.35}
.meeting-create-dialog[open]{width:min(720px,calc(100vw - 28px));max-width:720px}.meeting-create-dialog.visit-mode[open]{width:min(920px,calc(100vw - 28px));max-width:920px}.meeting-create-dialog>form{display:flex;flex-direction:column;min-height:0;width:100%}.meeting-create-dialog .dialog-head>div:first-child{min-width:0;flex:1}.meeting-create-dialog .dialog-head h2{display:flex;align-items:center;gap:9px;margin:0}.meeting-create-dialog .dialog-head h2 [data-fui],.meeting-create-dialog .dialog-head h2 .fui-icon{color:var(--brand-orange);flex:0 0 auto}.meeting-create-dialog .dialog-head p{margin:5px 0 0;color:var(--muted);font-size:.82rem}.meeting-create-dialog-body{display:grid;gap:14px}.meeting-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}.meeting-create-section{display:flex;align-items:center;gap:10px;margin-top:2px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.meeting-create-section:not(:first-child){margin-top:5px}.meeting-create-section>[data-fui],.meeting-create-section>.fui-icon{color:var(--brand-orange);flex:0 0 auto}.meeting-create-section>div{min-width:0;display:grid;gap:2px}.meeting-create-section strong{color:var(--ink);font-size:.84rem}.meeting-create-section small{color:var(--muted);font-size:.73rem;line-height:1.3}.meeting-create-dialog .field input,.meeting-create-dialog .field select{min-height:42px}
.meeting-create-visit{display:grid;gap:12px;padding:2px}.meeting-create-visit>.meeting-create-section{margin:0}.meeting-visit-fields{display:grid;gap:14px;padding:16px;border:1px solid color-mix(in srgb,var(--brand-orange) 28%,var(--line));border-radius:18px;background:color-mix(in srgb,var(--brand-orange) 5%,var(--surface))}.meeting-visit-heading{display:flex;align-items:flex-start;gap:12px}.meeting-visit-heading>[data-fui],.meeting-visit-heading>.fui-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--brand-orange-soft);color:var(--brand-orange);flex:0 0 auto}.meeting-visit-heading h3{margin:0 0 3px}.meeting-visit-heading p{margin:0;color:var(--muted);font-size:.8rem}.meeting-visit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}.meeting-visit-subsection{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.meeting-visit-subsection>strong{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.meeting-visit-hours{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.meeting-visit-hours label,.meeting-visit-counters label{display:grid;gap:5px;color:var(--muted);font-size:.72rem;font-weight:800}.meeting-visit-hours input,.meeting-visit-counters input{width:100%;min-width:0}.meeting-visit-counters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}.meeting-visit-contacts{display:grid;gap:10px}.meeting-visit-person-row{position:relative;display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:12px 14px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.meeting-visit-person-remove{position:absolute;top:7px;right:7px}.meeting-visit-person-row.has-remove .field:last-of-type{padding-right:38px}.meeting-workspace.meeting-visit-mode .meeting-generic-only{display:none!important}.meeting-create-visit .field textarea,.meeting-visit-fields .field textarea{resize:vertical;min-height:68px}html[data-theme="dark"] .meeting-visit-fields{background:color-mix(in srgb,var(--brand-orange) 7%,var(--surface));border-color:color-mix(in srgb,var(--brand-orange) 40%,var(--line))}
.meeting-kpi-grid .kpi{min-height:116px;padding:15px 70px 15px 15px}.meeting-kpi-grid .kpi::before{display:none}.meeting-kpi-grid .kpi-label{max-width:100%;line-height:1.25;overflow-wrap:anywhere}.meeting-kpi-grid .kpi-icon{top:13px;right:13px}.meeting-kpi-grid .kpi-icon .fui-icon,.meeting-kpi-grid .kpi-icon svg{width:23px!important;height:23px!important}
.meeting-attendance{display:grid;gap:12px;padding:15px;border:1px solid var(--line);border-radius:18px;background:var(--surface-2)}
.meeting-attendance-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.meeting-attendance-toolbar h3{margin:0 0 3px}.meeting-attendance-toolbar p{margin:0;color:var(--muted);font-size:.8rem}.meeting-contact-list-picker{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.meeting-contact-list-picker select{min-width:245px}
.meeting-selected-lists{display:flex;gap:8px;flex-wrap:wrap}.meeting-selected-lists.is-scrollable{max-height:92px;overflow-y:auto;overscroll-behavior:contain;padding:3px 6px 3px 3px;scrollbar-gutter:stable}.meeting-selected-list{display:flex;align-items:center;gap:9px;padding:7px 8px 7px 11px;border:1px solid color-mix(in srgb,var(--brand-orange) 35%,var(--line));border-radius:999px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-size:.75rem}.meeting-selected-list span{display:flex;align-items:center;gap:5px;color:var(--ink-2);font-weight:650}.meeting-selected-list input{width:15px;height:15px;accent-color:var(--brand-orange)}.meeting-selected-list button{width:25px;height:25px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:1.15rem;cursor:pointer}.meeting-selected-list button:hover{background:#f36f2120}
.meeting-attendance-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.meeting-attendance-column{min-height:150px;padding:10px;border:2px dashed var(--line);border-radius:16px;background:var(--surface);transition:.16s;overflow:hidden}.meeting-attendance-column.dragover{border-color:var(--brand-orange);background:var(--brand-orange-soft)}.meeting-attendance-column>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.meeting-attendance-column h4{margin:0}.meeting-attendance-column>header span{display:grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:999px;background:var(--surface-2);font-weight:850}.meeting-person-list{display:grid;gap:7px;max-height:390px;overflow-y:auto;overscroll-behavior:contain;padding-right:4px;scrollbar-gutter:stable}.meeting-person-card{display:grid;grid-template-columns:18px minmax(0,1fr) 34px 34px;gap:6px;align-items:center;padding:7px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);cursor:grab;min-width:0}.meeting-person-card.dragging{opacity:.45}.meeting-person-drag{color:var(--muted)}.meeting-person-card>div{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;min-width:0}.meeting-person-card input{width:100%;height:34px!important;min-height:34px!important;padding:5px 7px!important;font-size:.8rem!important}.meeting-person-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--brand-orange);font-weight:750;font-size:.67rem}.meeting-person-card>.btn{width:34px!important;min-width:34px!important;height:34px!important;padding:0!important}
.meeting-contact-list-add{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(300px,1.3fr) auto;gap:10px;align-items:start}.meeting-contact-list-add textarea{grid-row:span 2;resize:vertical}.meeting-show-list-name{display:flex;align-items:flex-start;gap:8px;font-size:.78rem;color:var(--muted);line-height:1.35}.meeting-show-list-name input{width:17px;height:17px;accent-color:var(--brand-orange)}.meeting-contact-list-settings{display:grid;gap:8px}.meeting-contact-list-settings.is-scrollable{max-height:238px;overflow-y:auto;overscroll-behavior:contain;padding-right:5px;scrollbar-gutter:stable}.meeting-contact-setting{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(220px,1.3fr) auto;gap:12px;align-items:center;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.meeting-contact-setting strong,.meeting-contact-setting small{display:block}.meeting-contact-setting small{color:var(--muted)}.meeting-contact-preview{display:flex;gap:5px;flex-wrap:wrap}.meeting-contact-preview span{padding:4px 7px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:.7rem}
.dashboard-meeting-summary{display:grid;gap:8px}.dashboard-meeting-next{display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.dashboard-meeting-date{display:grid;place-items:center;height:52px;border-radius:12px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-weight:900}.dashboard-meeting-date small{font-size:.62rem;text-transform:uppercase}.dashboard-meeting-next strong{display:block}.dashboard-meeting-next small{color:var(--muted)}.dashboard-meeting-counters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dashboard-meeting-counter{padding:9px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.dashboard-meeting-counter strong{display:block;font-size:1.15rem}.dashboard-meeting-counter span{font-size:.72rem;color:var(--muted)}
.dashboard-upcoming-meetings{display:grid;gap:7px;max-height:340px;overflow:auto}
.dashboard-upcoming-meeting-row{display:grid;grid-template-columns:46px minmax(0,1fr);gap:10px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);text-align:left;width:100%;cursor:pointer;transition:background .12s ease}
.dashboard-upcoming-meeting-row:hover{background:var(--brand-orange-soft)}
.dashboard-upcoming-meeting-row .dashboard-meeting-date{height:44px;font-size:.92rem}
.dashboard-upcoming-meeting-info{min-width:0}
.dashboard-upcoming-meeting-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}
.dashboard-upcoming-meeting-info small{color:var(--muted);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

html[data-theme="dark"] .meeting-note-card[data-note-type="Décision"]{background:#3b241b}html[data-theme="dark"] .meeting-note-card[data-note-type="Action"]{background:#173326}html[data-theme="dark"] .meeting-note-card[data-note-type="Question"]{background:#382b18}html[data-theme="dark"] .meeting-note-card[data-note-type="À suivre"]{background:#2e2341}html[data-theme="dark"] .meeting-note-card[data-note-type="Confidentiel"]{background:#3c2023}html[data-theme="dark"] .meeting-note-card[data-note-type="Information"]{background:#1d2f46}
html[data-theme="dark"] .meeting-subnav,html[data-theme="dark"] .meeting-filterbar,html[data-theme="dark"] .meeting-list-card,html[data-theme="dark"] .meeting-meta-grid,html[data-theme="dark"] .meeting-section-card,html[data-theme="dark"] .meeting-documents-card,html[data-theme="dark"] .meeting-settings-card,html[data-theme="dark"] .meeting-report-card,html[data-theme="dark"] .meeting-report-head,html[data-theme="dark"] .meeting-workspace-head{background:var(--surface);color:var(--ink-2)}

@media(max-width:1180px){.meeting-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.meeting-note-card{grid-template-columns:130px minmax(0,1fr) 130px 120px 86px auto}.meeting-filterbar{grid-template-columns:2fr 1fr 1fr}.meeting-filterbar .field:nth-of-type(4){grid-column:1/2}}
@media(max-width:820px){.meeting-subsections{margin-left:8px;padding-left:8px}.meeting-section-head{grid-template-columns:1fr auto}.meeting-section-level{grid-column:1/-1;justify-self:start}.meeting-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.meeting-filterbar,.meeting-meta-grid,.meeting-create-grid{grid-template-columns:1fr}.meeting-meta-grid .span-2,.meeting-create-grid .span-2{grid-column:1}.meeting-list-card{grid-template-columns:70px minmax(0,1fr)}.meeting-list-meta{grid-column:1/-1;justify-content:flex-start}.meeting-workspace-head,.meeting-section-toolbar{align-items:flex-start;flex-direction:column}.meeting-workspace-actions{justify-content:flex-start}.meeting-note-card{grid-template-columns:1fr}.meeting-note-extra.hidden-field{display:none}.meeting-report-card{grid-template-columns:auto minmax(0,1fr)}.meeting-report-actions{grid-column:1/-1}.meeting-document-row{grid-template-columns:auto minmax(0,1fr)}.meeting-document-row>time,.meeting-document-actions{grid-column:2}.meeting-filterbar .field:nth-of-type(4){grid-column:auto}}
.month-dot.dot-meeting{background:#ede9fe;color:#6d28d9}.meeting-chip{border-color:#c4b5fd!important;background:#f5f3ff!important;color:#5b21b6!important}html[data-theme="dark"] .meeting-chip{background:#2e2341!important;color:#ddd6fe!important;border-color:#6d28d9!important}

@media(max-width:820px){.meeting-type-add,.meeting-type-row{grid-template-columns:1fr}.meeting-type-actions{justify-content:flex-end}}
@media(max-width:900px){.meeting-attendance-toolbar{flex-direction:column}.meeting-contact-list-picker{width:100%}.meeting-contact-list-picker select{min-width:0;flex:1}.meeting-attendance-columns{grid-template-columns:1fr}.meeting-contact-list-add,.meeting-contact-setting,.meeting-visit-person-row{grid-template-columns:1fr}.meeting-contact-list-add textarea{grid-row:auto}.meeting-person-card>div{grid-template-columns:1fr}.meeting-person-card small{grid-column:auto}}
@media(max-width:720px){.meeting-visit-grid{grid-template-columns:1fr}.meeting-visit-grid>.span-2{grid-column:auto}.meeting-visit-hours{grid-template-columns:1fr 1fr}.meeting-visit-counters{grid-template-columns:1fr}.meeting-create-dialog.visit-mode[open]{width:calc(100vw - 18px)}}

/* V6.16 - Modèles de compte rendu par type et export Word fiabilisé */

/* V6.20 — lecteur de compte rendu compatible Safari et sans blocage */
.meeting-report-preview-dialog{width:min(1180px,96vw);height:min(920px,94vh);padding:0;border:0;border-radius:18px;overflow:hidden;background:var(--surface,#fff);color:var(--text,#172033);box-shadow:0 24px 80px rgba(8,21,47,.28)}
.meeting-report-preview-dialog::backdrop{background:rgba(8,21,47,.68);backdrop-filter:blur(3px)}
.meeting-report-preview-head{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 14px 10px 18px;border-bottom:1px solid var(--border,#e5e7eb);background:var(--surface,#fff)}
.meeting-report-preview-head>div:first-child{display:grid;gap:2px;min-width:0}.meeting-report-preview-head strong{font-size:1rem;color:var(--text,#172033)}.meeting-report-preview-head small{color:var(--muted,#64748b)}
.meeting-report-preview-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.meeting-report-preview-body{position:relative;height:calc(100% - 64px);background:#dfe3e8}.meeting-report-preview-frame{width:100%;height:100%;border:0;background:#eef1f5;opacity:1;transition:opacity .16s ease}.meeting-report-preview-frame.is-loading{opacity:0}.meeting-report-preview-status{position:absolute;z-index:2;inset:0;display:grid;place-items:center;padding:24px;text-align:center;font-weight:700;color:#172033;background:#eef1f5}.meeting-report-preview-status[hidden]{display:none!important}.meeting-report-preview-status.is-error{color:#991b1b;background:#fff1f2}
@media(max-width:700px){.meeting-report-preview-dialog{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0}.meeting-report-preview-head{align-items:flex-start;min-height:76px}.meeting-report-preview-head small{display:none}.meeting-report-preview-actions .btn-primary{font-size:.82rem}.meeting-report-preview-body{height:calc(100% - 76px)}}


/* ===== CFDT Suite V6.21 — dashboard stable et harmonisé ===== */
.global-search-icon,
.global-search-icon .fui-icon,
.global-search-icon svg {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.dashboard-welcome-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.dashboard-date,
.dashboard-customize-button {
  min-height: 54px;
  height: 54px;
}
.dashboard-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dashboard-customize-button {
  width: 54px;
  min-width: 54px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
}
.dashboard-customize-button .fui-icon { width: 20px; height: 20px; }
.dashboard-toolbar {
  min-height: 0;
  justify-content: flex-end;
  margin: -4px 0 10px;
  padding: 8px 10px;
  border: 1px dashed color-mix(in srgb,var(--brand-orange) 35%,var(--line));
  border-radius: 12px;
  background: color-mix(in srgb,var(--brand-orange-soft) 38%,transparent);
}
.dashboard-toolbar[hidden] { display: none !important; }

/* Une petite marge de sécurité dans les rangées empêche tout chevauchement
   lors des changements de police, de largeur ou des rendus asynchrones. */
.dashboard-layout.dashboard-masonry-ready {
  grid-auto-rows: 8px;
  overflow: visible;
}
.dashboard-layout.dashboard-masonry-ready .dashboard-widget {
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.dashboard-layout.dashboard-masonry-ready .dashboard-widget.dragging {
  z-index: 3;
}
.dashboard-widget[data-dashboard-widget="follow-up"] .suivi-card {
  background: var(--surface-2);
  box-shadow: 0 2px 8px rgba(7,21,45,.035);
}
html[data-theme="dark"] .dashboard-widget[data-dashboard-widget="follow-up"] .suivi-card {
  background: var(--surface-2);
  box-shadow: none;
}

/* Documents récents : mêmes cartes, bordures et interactions que les autres listes. */
.dashboard-documents {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
}
.dashboard-document-row {
  width: 100%;
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 5px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  text-align: left;
  box-shadow: 0 2px 8px rgba(7,21,45,.035);
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dashboard-document-row:last-child { border-bottom: 1px solid var(--line); }
.dashboard-document-row:hover {
  border-color: rgba(240,100,43,.6);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(7,21,45,.08);
}
.dashboard-document-icon {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1px;
  border-radius: 11px;
  background: var(--brand-orange-soft);
  color: var(--brand-orange-dark);
}
.dashboard-document-icon .fui-icon { width: 19px; height: 19px; }
.dashboard-document-icon small { font-size: .55rem; font-weight: 900; line-height: 1; }
.dashboard-document-main { min-width: 0; }
.dashboard-document-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}
.dashboard-document-main small { display: block; margin-top: 2px; color: var(--muted); font-size: .69rem; }
.dashboard-document-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: .66rem;
}
.dashboard-document-meta time,
.dashboard-document-meta em { color: inherit; font-style: normal; white-space: nowrap; }
html[data-theme="dark"] .dashboard-document-row { box-shadow: none; }
html[data-theme="dark"] .dashboard-document-row:hover { box-shadow: 0 7px 18px rgba(0,0,0,.24); }

@media (max-width: 1180px) {
  .dashboard-documents { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .dashboard-welcome { align-items: flex-start; }
  .dashboard-welcome-actions { align-items: stretch; }
  .dashboard-date { padding-inline: 10px; font-size: .82rem; }
  .dashboard-documents { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dashboard-welcome { flex-direction: column; }
  .dashboard-welcome-actions { width: 100%; }
  .dashboard-date { flex: 1; justify-content: center; }
}

/* ===== CFDT Suite V6.22 — CSE : icônes KPI et reconnaissance d’ordre du jour ===== */
.cse-kpi-grid .kpi {
  min-height: 116px;
  padding: 15px 64px 15px 15px;
  background: var(--surface);
}
.cse-kpi-grid .kpi::before { display: none; }
.cse-kpi-grid .kpi-icon { top: 14px; right: 14px; }

.cse-agenda-dialog[open] {
  width: min(1180px, calc(100vw - 28px));
  max-width: 1180px;
}
.cse-agenda-dialog .dialog-head > div:first-child { min-width: 0; }
.cse-agenda-dialog .dialog-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}
.cse-agenda-dialog .dialog-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.cse-agenda-body { display: grid; gap: 18px; }
.cse-agenda-source {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
}
.cse-agenda-options { margin-top: -2px; }
.cse-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-weight: 700;
  cursor: pointer;
}
.cse-checkbox-row input { width: 17px; height: 17px; accent-color: var(--brand-orange); }
.cse-agenda-analyze-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.cse-agenda-analysis-status {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
}
.cse-agenda-review {
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.cse-agenda-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.cse-agenda-review-head h3 { margin: 0; }
.cse-agenda-review-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.cse-agenda-review-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cse-agenda-proposals { display: grid; gap: 10px; }
.cse-agenda-proposal {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 40px;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(7,21,45,.04);
}
.cse-agenda-proposal:has([data-agenda-selected]:not(:checked)) { opacity: .58; }
.cse-agenda-proposal-select label {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 11px;
  background: var(--brand-orange-soft);
  color: var(--brand-orange-dark);
  cursor: pointer;
  font-weight: 900;
}
.cse-agenda-proposal-select input {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  accent-color: var(--brand-orange);
}
.cse-agenda-proposal-content { min-width: 0; }
.cse-agenda-proposal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
.cse-agenda-proposal-meta small { color: var(--muted); }
.cse-agenda-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
}
.cse-agenda-confidence-high { color: #167446; background: #e7f7ef; }
.cse-agenda-confidence-medium { color: #a15a08; background: #fff2dd; }
.cse-agenda-confidence-low { color: #6b587f; background: #f1eafa; }
.cse-agenda-proposal-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(180px,.7fr);
  gap: 10px;
}
.cse-agenda-proposal-grid .field { margin: 0; }
.cse-agenda-proposal-grid textarea { min-height: 68px; resize: vertical; }
.cse-agenda-proposal-actions { display: grid; gap: 6px; }
html[data-theme="dark"] .cse-agenda-source,
html[data-theme="dark"] .cse-agenda-proposal { box-shadow: none; }
html[data-theme="dark"] .cse-agenda-confidence-high { color: #76d5a6; background: rgba(31,142,85,.18); }
html[data-theme="dark"] .cse-agenda-confidence-medium { color: #ffc46d; background: rgba(201,111,8,.19); }
html[data-theme="dark"] .cse-agenda-confidence-low { color: #cbb0e9; background: rgba(114,80,151,.22); }

@media (max-width: 780px) {
  .cse-agenda-review-head { flex-direction: column; }
  .cse-agenda-review-actions { justify-content: flex-start; }
  .cse-agenda-proposal { grid-template-columns: 42px minmax(0,1fr); }
  .cse-agenda-proposal-actions {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
  }
  .cse-agenda-proposal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cse-agenda-dialog { width: calc(100vw - 12px); }
  .cse-agenda-source { padding: 12px; }
  .cse-agenda-proposal { grid-template-columns: 1fr; }
  .cse-agenda-proposal-select { display: flex; }
  .cse-agenda-proposal-actions { grid-column: 1; }
}


/* V6.24 — barre CSE compacte et menu latéral rétractable */
.cse-page-head {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: start;
  gap: 12px;
}
.cse-page-head .page-head-actions {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
}
.cse-page-head .page-head-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sidebar-toggle { display: none; }
@media (min-width: 981px) {
  .tabs {
    padding-top: 112px;
    transition: width .2s ease, padding .2s ease;
  }
  .tabs::before {
    transition: left .2s ease, right .2s ease, background-image .2s ease;
  }
  .sidebar-toggle {
    position: absolute;
    z-index: 3;
    top: 72px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-2);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  .sidebar-toggle:hover {
    border-color: var(--brand-orange);
    background: var(--brand-orange-soft);
    color: var(--brand-orange-dark);
  }
  .sidebar-toggle .fui-icon { width: 17px; height: 17px; }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0,1fr);
  }
  .app-shell.sidebar-collapsed .tabs {
    padding: 112px 10px 18px;
    overflow: visible;
    z-index: 1200;
  }
  .app-shell.sidebar-collapsed .tabs::before {
    left: 14px;
    right: 14px;
    background-image: url('icons/menu-replie-clair.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
  }
  html[data-theme="dark"] .app-shell.sidebar-collapsed .tabs::before {
    background-image: url('icons/menu-replie-sombre.png');
  }
  .app-shell.sidebar-collapsed .sidebar-toggle {
    right: 22px;
  }
  .app-shell.sidebar-collapsed .tab-button {
    position: relative;
    min-height: 44px;
    justify-content: center;
    gap: 0;
    padding: 10px;
    font-size: 0;
    line-height: 0;
  }
  .app-shell.sidebar-collapsed .tab-button .fui-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
  }
  .app-shell.sidebar-collapsed .tab-button::after {
    content: attr(data-menu-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    z-index: 1300;
    display: block;
    width: max-content;
    max-width: 230px;
    padding: 9px 12px;
    border-radius: 9px;
    background: var(--brand-orange);
    color: #fff;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    box-shadow: 0 8px 20px rgba(173,68,8,.28);
    opacity: 0;
    pointer-events: none;
    transform: translate(-6px,-50%);
    transition: opacity .14s ease,transform .14s ease;
  }
  .app-shell.sidebar-collapsed .tab-button:hover::after,
  .app-shell.sidebar-collapsed .tab-button:focus-visible::after {
    opacity: 1;
    transform: translate(0,-50%);
  }
}

@media (max-width: 720px) {
  .cse-page-head .page-head-actions {
    margin-right: -4px;
    padding-bottom: 8px;
  }
}

/* V6.25 — hauteur uniforme des champs et filtres sur une seule ligne */
:root {
  --control-height: 42px;
}

/* Tous les contrôles à saisie unique partagent exactement la même hauteur. */
html body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html body select:not([multiple]) {
  height: var(--control-height) !important;
  min-height: var(--control-height) !important;
  max-height: var(--control-height);
  box-sizing: border-box;
}/* Les boutons placés dans une barre de filtres restent parfaitement alignés. */
.filters-row .btn,
.cse-toolbar .btn,
.cse-document-toolbar .btn,
.meeting-filterbar .btn,
.media-explorer-toolbar .btn,
#view-postits .postit-toolbar .btn {
  height: var(--control-height);
  min-height: var(--control-height);
  flex: 0 0 auto;
}/* Une seule ligne de filtres sur tous les modules. En largeur réduite,
la ligne
   reste intacte et devient simplement défilable horizontalement. */
.filters-row,
.cse-toolbar,
.cse-document-toolbar,
.meeting-filterbar,
.media-explorer-toolbar,
#view-postits .postit-toolbar {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: flex-end !important;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 5px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}.filters-row > .field,
.cse-toolbar > .field,
.cse-document-toolbar > .field,
.meeting-filterbar > .field,
#view-postits .postit-toolbar > .field {
  flex: 0 1 170px;
  min-width: 130px;
  width: auto !important;
  margin: 0;
}.filters-row > .field:first-child,
.cse-toolbar > .cse-search-field,
.cse-document-toolbar > .cse-search-field,
.meeting-filterbar > .field:first-child,
#view-postits .postit-toolbar > .field:first-child {
  flex: 1 1 300px;
  min-width: 230px;
}

/* La médiathèque possède des contrôles directs sans conteneur .field. */
.media-explorer-toolbar > input {
  flex: 1 1 320px;
  min-width: 240px;
}
.media-explorer-toolbar > select {
  flex: 0 1 210px;
  min-width: 150px;
}
.media-explorer-toolbar > #media-count {
  flex: 0 0 auto;
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

/* Les éléments spécifiques des Post-it ne doivent pas provoquer de retour à la ligne. */
#view-postits .postit-toolbar > * {
  flex: 0 0 auto;
}
#view-postits .postit-toolbar > .field:first-child {
  flex: 1 1 360px;
}
#view-postits .postit-toolbar .postit-board-filter {
  flex: 0 1 220px;
}
#view-postits .postit-toolbar .postit-count,
#view-postits .postit-toolbar .postit-toggle,
#view-postits .postit-toolbar .postit-zoom-controls {
  align-self: center;
  white-space: nowrap;
}

/* Neutralise les anciens placements de grille appliqués à certaines largeurs. */
.cse-search-field,
.meeting-filterbar .field:nth-of-type(4),
.media-explorer-toolbar #media-count,
#view-postits .postit-toolbar .postit-count,
#view-postits .postit-toolbar .postit-zoom-controls {
  grid-column: auto !important;
}

@media (max-width: 900px) {.filters-row,
.cse-toolbar,
.cse-document-toolbar,
.meeting-filterbar,
.media-explorer-toolbar,
#view-postits .postit-toolbar {
    flex-direction: row !important;
    align-items: flex-end !important;
  }
}

/* ===== Correspondances ===== */
.correspondence-page{display:grid;gap:16px}.correspondence-filters{display:grid;grid-template-columns:minmax(240px,1fr) 180px 180px;gap:12px;align-items:end}.correspondence-summary{font-size:.82rem;color:var(--muted);font-weight:700}.correspondence-table{width:100%;border-collapse:collapse}.correspondence-table th,.correspondence-table td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.correspondence-table th{font-size:.74rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);background:var(--surface-2)}.correspondence-table th button{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:850;text-transform:inherit;letter-spacing:inherit;cursor:pointer;white-space:nowrap}.correspondence-table th button.active{color:var(--brand-orange)}.correspondence-table .correspondence-date,.correspondence-table td:nth-child(2),.correspondence-table td:nth-child(3){white-space:nowrap;min-width:102px}.correspondence-table td:nth-child(5),.correspondence-table td:nth-child(6){max-width:310px;white-space:pre-line;overflow-wrap:anywhere}.correspondence-table .is-pending{background:color-mix(in srgb,var(--brand-orange-soft) 48%,var(--surface))}.correspondence-actions{display:flex;gap:5px;white-space:nowrap;width:78px}@media(max-width:760px){.correspondence-filters{grid-template-columns:1fr}.correspondence-table{min-width:920px}}
.casimir-widget{position:fixed;right:20px;bottom:16px;z-index:80;display:flex;align-items:flex-end;filter:drop-shadow(0 10px 20px rgba(7,21,45,.23));transition:.2s}.casimir-character{position:relative;z-index:2;border:0;background:transparent;padding:0;width:145px;height:175px;cursor:pointer;display:block}.casimir-character img{width:100%;height:100%;object-fit:contain;object-position:center bottom}.casimir-chat-close{border:0;background:transparent;color:var(--muted);font-size:1.25rem;cursor:pointer}.casimir-chat{position:absolute;right:0;bottom:150px;width:min(380px,calc(100vw - 28px));height:470px;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface);filter:none;box-shadow:0 15px 40px rgba(7,21,45,.28)}.casimir-chat[hidden]{display:none}.casimir-chat-head{display:flex;justify-content:space-between;align-items:center;padding:13px 12px 13px 15px;border-bottom:1px solid var(--line);background:var(--surface-2)}.casimir-chat-head strong,.casimir-chat-head span{display:block}.casimir-chat-head strong{color:var(--brand-orange-dark)}.casimir-chat-head span{font-size:.73rem;color:var(--muted)}.casimir-chat-actions{display:flex;align-items:center;gap:5px}.casimir-chat-actions #casimir-reset{border:0;border-radius:7px;background:transparent;color:var(--muted);padding:5px 7px;font:inherit;font-size:.7rem;font-weight:700;cursor:pointer}.casimir-chat-actions #casimir-reset:hover{background:var(--surface);color:var(--brand-orange-dark)}.casimir-messages{display:flex;flex-direction:column;gap:10px;overflow:auto;padding:13px;background:var(--surface)}.casimir-message{max-width:92%;padding:9px 11px;border-radius:12px;font-size:.82rem;line-height:1.42;white-space:pre-wrap}.casimir-message.assistant{align-self:flex-start;background:var(--surface-2);color:var(--ink-2)}.casimir-message.user{align-self:flex-end;background:var(--brand-orange);color:#fff}.casimir-sources{display:grid;gap:5px;margin-top:4px}.casimir-source{display:block;width:100%;padding:6px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:.72rem;text-align:left;cursor:pointer}.casimir-source:hover{border-color:var(--brand-orange)}.casimir-form{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;padding:10px;border-top:1px solid var(--line);background:var(--surface-2)}.casimir-form textarea{min-height:42px;max-height:84px;resize:vertical;padding:8px;font:inherit;font-size:.8rem}.casimir-widget.is-collapsed{right:14px;bottom:14px}.casimir-widget.is-collapsed .casimir-character{width:62px;height:62px;border-radius:50%;overflow:hidden;background:var(--brand-orange);border:2px solid var(--surface)}.casimir-widget.is-collapsed .casimir-character img{width:95px;height:95px;max-width:none;transform:translate(-17px,-3px)}@media(max-width:680px){.casimir-widget{right:8px;bottom:8px}.casimir-character{width:105px;height:132px}.casimir-chat{right:-2px;bottom:65px;height:min(470px,calc(100vh - 105px))}}
.casimir-archive{display:flex;flex-direction:column;gap:10px;overflow:auto;padding:13px;background:var(--surface)}.casimir-archive-title{margin:0;color:var(--ink);font-size:.9rem}.casimir-archive-item{padding:10px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);font-size:.77rem;line-height:1.4}.casimir-archive-item strong,.casimir-archive-item span{display:block}.casimir-archive-item strong{margin:5px 26px 4px 0}.casimir-archive-item span{white-space:pre-wrap;color:var(--ink-2)}.casimir-archive-date{color:var(--muted)!important;font-size:.68rem}.casimir-archive-delete{float:right;border:0;border-radius:6px;background:transparent;color:var(--muted);padding:3px 5px;font-size:.7rem;cursor:pointer}.casimir-archive-delete:hover{color:#c42c2c;background:#ffe8e8}.casimir-chat-actions #casimir-archive-toggle{border:0;border-radius:7px;background:transparent;color:var(--muted);padding:5px 7px;font:inherit;font-size:.7rem;font-weight:700;cursor:pointer}.casimir-chat-actions #casimir-archive-toggle:hover{background:var(--surface);color:var(--brand-orange-dark)}
.casimir-chat{width:min(520px,calc(100vw - 28px));height:560px}.casimir-messages[hidden],.casimir-archive[hidden],.casimir-form[hidden]{display:none!important}.casimir-archive{min-height:0;gap:14px;padding:16px;background:var(--surface)}.casimir-archive-title{font-size:1rem}.casimir-archive-item{padding:14px;font-size:.86rem;line-height:1.5;box-shadow:0 1px 2px rgba(7,21,45,.04)}.casimir-archive-item strong{margin:7px 34px 7px 0;color:var(--ink)}.casimir-archive-item span{max-height:10.5em;overflow:auto;padding-right:4px}.casimir-archive-date{font-size:.73rem}.casimir-archive-delete{padding:5px 8px;font-size:.76rem;font-weight:700}.casimir-chat:has(.casimir-archive:not([hidden])){grid-template-rows:auto 1fr}@media(max-width:680px){.casimir-chat{width:calc(100vw - 18px);height:min(560px,calc(100vh - 92px))}}
.casimir-archive-sources{margin-top:10px}.casimir-archive-sources .casimir-source{font-size:.76rem;line-height:1.25}
.casimir-archive-item.is-highlighted{border-color:var(--brand-orange);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-orange) 25%,transparent)}
.casimir-widget{z-index:2000}
/* ===== CFDT Suite V6.28 — recherche générale sur une page dédiée ===== */
.global-search-wrap {
  height: 42px;
  padding: 0 7px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.global-search-wrap input {
  min-width: 0;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.global-search-wrap input:focus-visible {
  outline: 0;
}
.global-search-wrap:focus-within {
  border-color: var(--brand-orange, #f36f21);
  box-shadow: 0 0 0 3px rgba(243,111,33,.14);
}
.global-search-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.global-search-icon:hover {
  color: var(--brand-orange, #f36f21);
  background: var(--primary-soft);
}
.global-search-icon .fui-icon,
.global-search-icon svg {
  width: 18px;
  height: 18px;
}

.global-search-page {
  max-width: 1280px;
}
.global-search-page-head {
  align-items: flex-start;
}
.global-search-page-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.global-search-page-head h2 .fui-icon {
  width: 24px;
  height: 24px;
  color: var(--brand-orange, #f36f21);
}
.global-search-page-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  margin: 18px 0 14px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.global-search-page-toolbar .field {
  flex: 0 0 auto;
  margin: 0;
}
.global-search-page-toolbar .global-search-page-query {
  flex: 1 1 520px;
  min-width: 300px;
}
.global-search-page-toolbar .global-search-page-filter {
  flex: 0 0 230px;
}
.global-search-page-toolbar input,
.global-search-page-toolbar select,
.global-search-page-toolbar .btn {
  height: 42px !important;
  min-height: 42px !important;
}
.global-search-page-submit {
  flex: 0 0 auto;
  white-space: nowrap;
}
.global-search-page-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.global-search-total {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}
.global-search-total strong {
  color: var(--ink-2, var(--text));
  font-size: 1rem;
}
.global-search-total span {
  color: var(--muted);
  font-size: .82rem;
}
.global-search-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.global-search-counts > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: .78rem;
  white-space: nowrap;
}
.global-search-counts .fui-icon {
  width: 14px;
  height: 14px;
  color: var(--brand-orange, #f36f21);
}
.global-search-counts strong {
  color: var(--ink-2, var(--text));
}
.global-search-page-results {
  display: grid;
  gap: 18px;
}
.global-search-result-group {
  min-width: 0;
}
.global-search-result-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.global-search-result-group-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-2, var(--text));
  font-size: .96rem;
}
.global-search-result-group-head h3 .fui-icon {
  width: 18px;
  height: 18px;
  color: var(--brand-orange, #f36f21);
}
.global-search-result-group-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: .78rem;
  font-weight: 700;
}
.global-search-result-list {
  display: grid;
  gap: 8px;
}
.global-search-result-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.global-search-result-card:hover {
  border-color: rgba(243,111,33,.48);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.global-search-result-card:focus-visible {
  outline: 3px solid rgba(243,111,33,.22);
  outline-offset: 1px;
}
.global-search-result-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--brand-orange, #f36f21);
  background: rgba(243,111,33,.10);
}
.global-search-result-icon .fui-icon {
  width: 20px;
  height: 20px;
}
.global-search-result-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.global-search-result-main > strong {
  overflow: hidden;
  color: var(--ink-2, var(--text));
  font-size: .98rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-result-meta {
  overflow: hidden;
  color: var(--brand-orange, #f36f21);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-result-main small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.global-search-result-main mark {
  padding: 0 .08em;
  border-radius: 3px;
  color: inherit;
  background: rgba(255,174,75,.34);
}
.global-search-result-arrow {
  color: var(--muted);
}
.global-search-result-arrow .fui-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .global-search-page-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .global-search-counts {
    justify-content: flex-start;
  }
  .global-search-result-card {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    padding: 11px;
  }
  .global-search-result-icon {
    width: 38px;
    height: 38px;
  }
}
.meta-inline-action{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.meta-inline-action small{flex:1 1 320px;color:var(--muted);font-size:.74rem;line-height:1.35}
.meta-permission-status{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}
.meta-permission-status>.fui-icon,.meta-permission-status>[data-fui]{width:32px;height:32px;padding:7px;border-radius:9px;background:var(--primary-soft);color:var(--primary)}
.meta-permission-status strong,.meta-permission-status small{display:block}.meta-permission-status small{margin-top:2px;color:var(--muted);font-size:.72rem;line-height:1.4;overflow-wrap:anywhere}
.meta-permission-status.is-warning{border-color:color-mix(in srgb,#d97706 40%,var(--border));background:color-mix(in srgb,#d97706 6%,var(--surface))}.meta-permission-status.is-warning>.fui-icon{color:#b45309;background:rgba(217,119,6,.13)}
.meta-permission-status.is-complete{border-color:color-mix(in srgb,#22a06b 40%,var(--border));background:color-mix(in srgb,#22a06b 6%,var(--surface))}.meta-permission-status.is-complete>.fui-icon{color:#16875a;background:rgba(34,160,107,.13)}
.meta-account-preview{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:11px;padding:12px;border:1px dashed var(--border-strong,var(--border));border-radius:13px;background:var(--surface-2)}
.meta-account-preview>span,.meta-account-preview>.fui-icon{width:38px;height:38px;padding:9px;border-radius:11px;background:var(--primary-soft);color:var(--primary)}
.meta-account-preview strong,.meta-account-preview small{display:block}.meta-account-preview small{margin-top:3px;color:var(--muted);font-size:.75rem}
.meta-auto-toggle{display:flex;align-items:flex-start;gap:11px;padding:12px 13px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2);cursor:pointer}
.meta-auto-toggle input{flex:0 0 auto;width:19px;height:19px;margin-top:1px;accent-color:var(--primary)}
.meta-auto-toggle strong,.meta-auto-toggle small{display:block}.meta-auto-toggle small{margin-top:3px;color:var(--muted);font-size:.74rem;line-height:1.4}
.meta-cron-field>div{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px}.meta-cron-field input{font:500 .72rem/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.meta-sync-history{padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.meta-sync-history summary{cursor:pointer;font-weight:800;color:var(--ink-2)}
.meta-sync-history-list{display:grid;gap:7px;margin-top:11px}
.meta-sync-history-list article{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2)}
.meta-sync-history-list article>.fui-icon{width:30px;height:30px;padding:7px;border-radius:9px;background:rgba(34,160,107,.12);color:#16875a}.meta-sync-history-list article.failed>.fui-icon{background:rgba(201,42,42,.11);color:#c92a2a}
.meta-sync-history-list strong,.meta-sync-history-list small{display:block}.meta-sync-history-list small{margin-top:2px;color:var(--muted);font-size:.72rem;line-height:1.35}.meta-sync-history-list time{color:var(--muted);font-size:.71rem;white-space:nowrap}
.meta-metric-coverage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.meta-metric-coverage>article{min-width:0;padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2)}
.meta-coverage-head{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:10px}.meta-coverage-head>strong{font-size:.75rem;color:var(--muted);white-space:nowrap}
.meta-coverage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.meta-coverage-grid>span{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:7px 8px;border:1px solid var(--border);border-radius:9px;background:var(--surface);font-size:.69rem}.meta-coverage-grid b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta-coverage-grid em{font-style:normal;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted)}
.meta-coverage-grid .is-complete{border-color:color-mix(in srgb,#22a06b 32%,var(--border))}.meta-coverage-grid .is-complete em{color:#16875a;font-weight:800}.meta-coverage-grid .is-partial{border-color:color-mix(in srgb,#d97706 35%,var(--border))}.meta-coverage-grid .is-partial em{color:#b45309;font-weight:800}.meta-coverage-grid .is-empty{opacity:.72}.meta-metric-coverage article>small{display:block;margin-top:9px;color:var(--muted);font-size:.68rem;line-height:1.35}
@media(max-width:700px){.meta-metric-coverage{grid-template-columns:1fr}}
@media(max-width:640px){.meta-coverage-grid{grid-template-columns:1fr}.meta-sync-history-list article{grid-template-columns:32px minmax(0,1fr)}.meta-sync-history-list time{grid-column:2}}
/* V6.35 — carnet de réunion en direct */
.meeting-page{--meeting-orange:#f36f21;--meeting-blue:#4472c4}
.meeting-workspace{display:grid;gap:16px}
.meeting-workspace-head{position:sticky;top:0;z-index:8;background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:20px;padding:16px 18px;box-shadow:0 10px 32px rgba(8,21,47,.08)}
.meeting-live-toolbar{position:sticky;top:92px;z-index:7;display:flex;align-items:center;gap:8px;overflow-x:auto;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(8,21,47,.07)}
.meeting-live-label{display:grid;grid-template-columns:auto auto;column-gap:8px;min-width:230px;align-items:center;padding-right:12px;border-right:1px solid var(--line)}
.meeting-live-label>[data-fui]{grid-row:1/3;width:22px;height:22px;color:var(--meeting-orange)}
.meeting-live-label small{color:var(--muted);font-size:.7rem}
.meeting-quick-note{white-space:nowrap}.meeting-quick-note.info:hover{background:#eaf2ff;color:#2456a6}.meeting-quick-note.decision:hover{background:#fff0e6;color:#b9490b}.meeting-quick-note.action:hover{background:#eafaf2;color:#087a55}.meeting-quick-note.followup:hover{background:#f2edff;color:#6f42c1}
.meeting-meta-grid{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:20px}
.meeting-section-toolbar{padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:18px}
.meeting-section-card{box-shadow:0 8px 26px rgba(8,21,47,.06)}
.meeting-focus-mode .meeting-meta-grid,.meeting-focus-mode .meeting-documents-card{display:none}
.meeting-focus-mode .meeting-sections{max-width:1050px;width:100%;margin-inline:auto}
html[data-theme="dark"] .meeting-live-toolbar,html[data-theme="dark"] .meeting-workspace-head{background:#0b1220}
@media(max-width:820px){.meeting-live-label{min-width:190px}.meeting-workspace-head,.meeting-live-toolbar{position:relative;top:auto}}

/* ===== V6.40 — calendrier mensuel entièrement contenu dans la page ===== */
#view-calendar,
#view-calendar .content-page,
#cal-month-wrap {
  min-width: 0;
  max-width: 100%;
}

#view-calendar .content-page {
  overflow-x: clip;
}

#cal-month-wrap {
  width: 100%;
  overflow: hidden;
}

.month-grid {
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-grid > *,
.month-weekday,
.day-num-row,
.month-dots,
.month-more {
  min-width: 0;
  max-width: 100%;
}

.day-num-row {
  width: 100%;
  overflow: hidden;
}

.month-dots {
  justify-content: flex-end;
  overflow: hidden;
}

.month-chip {
  box-sizing: border-box;
}

@media (min-width: 981px) and (max-width: 1260px) {
  #view-calendar .content-page { padding-inline: 16px; }
  .month-grid { gap: 6px; }
  .month-cell { min-height: 96px; padding: 6px; gap: 4px; }
  .month-chip { padding-inline: 4px; font-size: .64rem; }
  .month-dot { min-width: 14px; height: 14px; padding-inline: 2px; }
}

@media (max-width: 720px) {
  #view-calendar .content-page { padding-inline: 10px; }
  #view-calendar .page-head { gap: 10px; margin-bottom: 12px; }
  #view-calendar .calendar-toolbar { gap: 8px; margin-bottom: 10px; }
  #view-calendar .state-legend { gap: 8px 12px; margin-bottom: 12px; }
  .month-grid { gap: 4px; }
  .month-weekday { font-size: .64rem; letter-spacing: 0; }
  .month-cell { min-height: 68px; border-radius: 9px; padding: 4px 3px; }
  .month-dots { gap: 2px; }
  .month-dot { min-width: 13px; height: 13px; padding: 0 2px; font-size: .55rem; }
  .month-add-btn { width: 16px; height: 16px; }
}

@media (max-width: 390px) {
  #view-calendar .content-page { padding-inline: 7px; }
  .month-grid { gap: 3px; }
  .month-cell { min-height: 62px; padding-inline: 2px; }
  .month-cell .day-num { font-size: .68rem; }
  .month-dot { min-width: 11px; height: 11px; padding: 0 1px; font-size: .5rem; }
  .month-add-btn { width: 14px; height: 14px; border: 0; }
}

/* ===== Communications syndicales ===== */
.comm-type-icon { display: inline-flex; vertical-align: -3px; margin-right: 2px; color: var(--muted); }
.comm-type-icon svg { width: 15px; height: 15px; }

/* ===== Accords d'entreprise et de groupe ===== */
.tag-input-row { display: flex; gap: 8px; }
.tag-input-row input { flex: 1; }
.tag-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--brand-orange-soft); color: var(--brand-orange-dark); font-size: .82rem; font-weight: 700;
}
.tag-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; display: inline-flex; padding: 3px; border-radius: 50%; }
.tag-chip button:hover { background: rgba(0,0,0,.08); }
.accord-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: .88rem; }
.accord-detail-meta strong { color: var(--ink); }
.accord-detail-description { white-space: pre-wrap; margin: 12px 0; }
.accord-detail-section-title { font-size: .9rem; font-weight: 800; margin: 18px 0 8px; color: var(--ink-2); }
.attachment-date { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.accord-sommaire { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.accord-sommaire-doc + .accord-sommaire-doc { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.accord-sommaire-doc-title { font-weight: 700; font-size: .84rem; margin: 0 0 4px; color: var(--ink-2); }
.accord-sommaire-doc ul { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--muted); }
.accord-version-block { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.accord-version-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.accord-version-head strong { display: block; }
.accord-doc-chapters { margin: 4px 0 2px 34px; font-size: .8rem; color: var(--muted); }
.accord-doc-chapters summary { cursor: pointer; color: var(--brand-orange-dark); font-weight: 600; }
.accord-doc-chapters ul { margin: 6px 0 0; padding-left: 16px; }

/* ===== CAS — Commission Affaires Sociales ===== */
.row-needs-review { background: rgba(238,139,22,.06); }
.row-needs-review:hover { background: rgba(238,139,22,.12); }
#cas-dialog-title { display: inline-block; margin-right: 10px; }

/* ===== Rendez-vous (calendrier) ===== */
.month-dot.dot-evenement{background:#dcfce7;color:#15803d}
.evenement-chip{border-color:#86efac!important;background:#f0fdf4!important;color:#15803d!important}
html[data-theme="dark"] .evenement-chip{background:#122a1c!important;color:#86efac!important;border-color:#15803d!important}

/* Tableau de bord fixe : deux widgets sur la première ligne, puis trois colonnes. */
.dashboard-layout{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;align-items:start}
.dashboard-fixed-widget{min-width:0}
.dashboard-postits-widget,.dashboard-upcoming-widget,.dashboard-meetings-widget,.dashboard-documents-widget{grid-column:span 1}
.dashboard-postits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dashboard-documents{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-postit{display:grid;align-content:start;gap:6px;min-width:0;min-height:92px;padding:11px;border:1px solid rgba(104,89,23,.17);border-radius:12px;background:var(--postit-color);color:#263238;text-align:left;box-shadow:0 3px 8px rgba(63,51,18,.1);transform:rotate(-.45deg);transition:transform .15s ease,box-shadow .15s ease}.dashboard-postit:nth-child(even){transform:rotate(.45deg)}.dashboard-postit:hover{transform:translateY(-2px) rotate(0);box-shadow:0 8px 18px rgba(63,51,18,.16)}.dashboard-postit strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem}.dashboard-postit span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:.72rem;line-height:1.32}.dashboard-date-link{cursor:pointer}.dashboard-date-link:hover{border-color:var(--brand-orange);color:var(--brand-orange-dark)}
@media(max-width:780px){.dashboard-layout{grid-template-columns:1fr}.dashboard-postits-widget,.dashboard-upcoming-widget,.dashboard-meetings-widget,.dashboard-documents-widget{grid-column:auto}}
@media(max-width:520px){.dashboard-postits{grid-template-columns:1fr}.dashboard-postit{min-height:76px}}

/* ===== V6.72 — Pilotage : planning, tâches et relances ===== */
.pilotage-page{display:grid;gap:0}.pilotage-page-head{align-items:flex-start}.pilotage-subnav{display:flex;gap:8px;padding:7px;margin-bottom:16px;background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow-x:auto}.pilotage-subtab{flex:0 0 auto;background:transparent;border-color:transparent;color:var(--muted)}.pilotage-subtab.active{background:var(--brand-orange);border-color:var(--brand-orange);color:#fff;box-shadow:0 6px 16px rgba(240,100,43,.22)}.pilotage-panel{display:none}.pilotage-panel.active{display:block}.pilotage-calendar-toolbar{padding:12px 14px;margin-bottom:12px;background:var(--surface);border:1px solid var(--line);border-radius:16px}.pilotage-calendar-toolbar .calendar-title{margin-left:auto}.pilotage-legend{padding:0 2px}.pilotage-dot-task{background:#d3a300}.pilotage-dot-meeting{background:#167f98}
.pilotage-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.pilotage-summary article{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.pilotage-summary article>.fui-icon{width:36px;height:36px;padding:8px;border-radius:11px;background:var(--brand-orange-soft);color:var(--brand-orange-dark)}.pilotage-summary small,.pilotage-summary strong,.pilotage-summary em{display:block}.pilotage-summary small{color:var(--muted);font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em}.pilotage-summary strong{margin-top:1px;color:var(--ink);font-size:1.25rem}.pilotage-summary em{overflow:hidden;margin-top:1px;color:var(--muted);font-size:.68rem;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
.pilotage-month-grid .month-cell{cursor:default}.pilotage-month-events{display:grid;gap:4px;min-width:0}.pilotage-cell-actions{display:inline-flex;gap:3px;opacity:0;transition:opacity .15s ease}.month-cell:hover .pilotage-cell-actions,.pilotage-cell-actions:focus-within{opacity:1}.pilotage-cell-actions button{display:inline-grid;width:20px;height:20px;padding:0;place-items:center;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--muted);font-size:.76rem;font-weight:900}.pilotage-cell-actions button:hover{border-color:var(--brand-orange);color:var(--brand-orange)}.pilotage-cell-actions .fui-icon{width:12px;height:12px}.pilotage-event-chip{display:flex;align-items:center;gap:4px;width:100%;min-width:0;padding:4px 7px;border:0;border-left:4px solid var(--grey);border-radius:8px;background:var(--surface-2);color:var(--ink-2);font-family:inherit;font-size:.73rem;font-weight:750;line-height:1.2;text-align:left;cursor:pointer}.pilotage-event-chip>span:last-child,.pilotage-event-chip>span:only-child{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.pilotage-event-chip>.fui-icon{width:13px;height:13px;flex:0 0 13px}.pilotage-task-chip{cursor:grab}.pilotage-task-chip.dragging{opacity:.4}.pilotage-task-chip.state-a_faire{border-left-color:#d3a300;background:#fff4ad;color:#594700}.pilotage-task-chip.state-en_cours{border-left-color:var(--amber);background:rgba(238,139,22,.12)}.pilotage-task-chip.state-a_suivre{border-left-color:var(--purple);background:rgba(139,92,246,.12)}.pilotage-task-chip.state-termine{border-left-color:var(--green);background:rgba(44,167,100,.13);color:#18673c}.pilotage-task-chip.state-annule{border-left-color:var(--grey);opacity:.7}.pilotage-task-chip.state-retard{border-left-color:var(--red);background:rgba(216,59,59,.11)}.pilotage-meeting-chip{border-left-color:#167f98;background:rgba(22,127,152,.11);color:#0c6477}.pilotage-month-grid .month-chip{display:flex}.pilotage-month-grid .month-more{border:0;background:transparent;text-align:left;cursor:pointer}.pilotage-week-scroll{overflow-x:auto;padding-bottom:4px}.pilotage-week-scroll .week-grid{min-width:980px}.pilotage-week-scroll .week-day-head{border:0}.week-allday-cell .pilotage-event-chip,.week-hour-cell .pilotage-event-chip{font-size:.68rem}.pilotage-day-add{width:100%;margin-top:8px}.day-hour-row .pilotage-event-chip{max-width:720px}.day-side-panel .pilotage-event-chip{font-size:.76rem}
.pilotage-task-filters{display:grid;grid-template-columns:minmax(240px,1fr) repeat(3,minmax(150px,.55fr)) auto;align-items:end;gap:10px;margin-bottom:14px}.pilotage-task-table td small,.pilotage-task-table td em{display:block;margin-top:3px;color:var(--muted);font-size:.7rem;font-style:normal}.pilotage-task-table td:nth-child(2),.pilotage-task-table td:nth-child(3){white-space:nowrap}.pilotage-table-title{display:block;width:100%;padding:0;border:0;background:transparent;color:var(--ink-2);font-weight:850;text-align:left}.pilotage-table-title:hover{color:var(--brand-orange-dark)}.pilotage-overdue{color:var(--red);font-weight:850}.pilotage-priority{display:inline-flex;padding:3px 8px;border-radius:999px;background:var(--surface-2);font-size:.68rem;font-weight:850}.pilotage-priority.priority-urgente{background:rgba(216,59,59,.12);color:#a72b2b}.pilotage-priority.priority-haute{background:rgba(238,139,22,.13);color:#9b5705}.pilotage-list-complete{color:var(--green);border-color:rgba(44,167,100,.3)}
.pilotage-task-dialog{width:min(780px,calc(100vw - 28px))!important}.pilotage-task-dialog .dialog-head>div{min-width:0;flex:1}.pilotage-task-dialog .dialog-head p{margin:4px 0 0;font-size:.76rem}.pilotage-task-quick-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:16px;padding:10px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}.pilotage-task-quick-actions>span{margin-right:3px;color:var(--muted);font-size:.72rem;font-weight:850;text-transform:uppercase}.pilotage-task-quick-actions .pilotage-wait-action{color:#6d28d9}.pilotage-task-quick-actions .pilotage-complete-action{color:#167446}.pilotage-form-section{display:flex;align-items:center;gap:10px;margin-top:7px;padding:10px 12px;border-radius:12px;background:var(--surface-2)}.pilotage-form-section>.fui-icon{width:28px;height:28px;padding:6px;border-radius:9px;background:var(--brand-orange-soft);color:var(--brand-orange-dark)}.pilotage-form-section strong,.pilotage-form-section small{display:block}.pilotage-form-section small{margin-top:2px;color:var(--muted);font-size:.71rem}.pilotage-time-range>div{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:7px}.pilotage-time-range>div span{color:var(--muted);font-size:.75rem}.pilotage-wait-fields{padding:0 12px 12px;border:1px solid color-mix(in srgb,var(--purple) 30%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--purple) 5%,var(--surface))}.pilotage-wait-fields>.pilotage-form-section{margin:0 -12px 12px;border-radius:13px 13px 0 0}.pilotage-history{margin-top:17px;padding-top:15px;border-top:1px solid var(--line)}.pilotage-history>div:last-child{display:grid;gap:7px;max-height:210px;overflow:auto}.pilotage-history article{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2)}.pilotage-history article>.fui-icon{width:26px;height:26px;padding:6px;border-radius:8px;background:var(--brand-orange-soft);color:var(--brand-orange-dark)}.pilotage-history strong,.pilotage-history small{display:block}.pilotage-history strong{font-size:.78rem}.pilotage-history small,.pilotage-history time{color:var(--muted);font-size:.68rem}.pilotage-history time{white-space:nowrap}
.dashboard-pilotage{display:grid;gap:9px}.dashboard-pilotage-counters{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.dashboard-pilotage-counters button{padding:8px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--ink-2)}.dashboard-pilotage-counters strong,.dashboard-pilotage-counters span{display:block}.dashboard-pilotage-counters strong{color:var(--ink);font-size:1.1rem}.dashboard-pilotage-counters span{margin-top:2px;color:var(--muted);font-size:.66rem;font-weight:750}.dashboard-pilotage-row{display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;gap:5px}.dashboard-pilotage-row>button:first-child{display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;gap:9px;min-width:0;padding:7px 8px;border:0;border-radius:10px;background:transparent;color:var(--ink-2);text-align:left}.dashboard-pilotage-row>button:first-child:hover{background:var(--surface-2)}.dashboard-pilotage-row strong,.dashboard-pilotage-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-pilotage-row strong{font-size:.78rem}.dashboard-pilotage-row small{margin-top:2px;color:var(--muted);font-size:.66rem}.dashboard-pilotage-state{width:8px;height:26px;border-radius:999px;background:#d3a300}.dashboard-pilotage-state.state-a_suivre{background:var(--purple)}.dashboard-pilotage-state.state-termine{background:var(--green)}.dashboard-pilotage-state.state-retard{background:var(--red)}.dashboard-pilotage-complete{display:grid;width:30px;height:30px;padding:6px;place-items:center;border:1px solid rgba(44,167,100,.3);border-radius:9px;background:transparent;color:var(--green)}.dashboard-pilotage-complete .fui-icon{width:15px;height:15px}.dashboard-pilotage-new{justify-self:start}
html[data-theme="dark"] .pilotage-task-chip.state-a_faire{background:#4a3e12;color:#ffe98d}html[data-theme="dark"] .pilotage-task-chip.state-termine{color:#77d9a5}html[data-theme="dark"] .pilotage-meeting-chip{color:#78d5e7;background:rgba(44,169,196,.15)}html[data-theme="dark"] .pilotage-wait-fields{background:rgba(139,92,246,.08)}
@media(max-width:1050px){.pilotage-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.pilotage-task-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.pilotage-task-filters>.btn{align-self:end}.pilotage-calendar-toolbar .calendar-title{width:100%;margin-left:0}}
@media(max-width:720px){.pilotage-summary{grid-template-columns:1fr 1fr}.pilotage-summary article{grid-template-columns:32px minmax(0,1fr);padding:9px}.pilotage-summary article>.fui-icon{width:30px;height:30px}.pilotage-task-filters{grid-template-columns:1fr}.pilotage-month-grid .pilotage-event-chip{display:none}.pilotage-month-grid .month-cell{min-height:78px}.pilotage-month-events:has(.pilotage-task-chip)::before{content:"•";color:#d3a300;font-size:1rem}.pilotage-month-events:has(.pilotage-meeting-chip)::after{content:"•";color:#167f98;font-size:1rem}.pilotage-month-events{display:flex;gap:2px}.pilotage-cell-actions{opacity:1}.pilotage-cell-actions button{width:18px;height:18px}.pilotage-task-quick-actions>span{width:100%}.pilotage-history article{grid-template-columns:28px minmax(0,1fr)}.pilotage-history time{grid-column:2}.pilotage-task-table{min-width:820px}}
@media(max-width:440px){.pilotage-summary{grid-template-columns:1fr}.pilotage-page-head .page-head-actions{width:100%}.pilotage-page-head .page-head-actions .btn{flex:1}.dashboard-pilotage-counters{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ===== V6.72.1 — créneaux de 30 minutes et planning pleine hauteur ===== */
.pilotage-task-dialog[open]{width:min(920px,calc(100vw - 28px))!important}
.pilotage-task-dialog>form{display:flex;flex-direction:column;width:100%;min-height:0}
.pilotage-task-dialog .field{align-content:start}
.pilotage-task-dialog .field input,.pilotage-task-dialog .field select{min-height:42px}
.pilotage-task-quick-actions{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.pilotage-task-quick-actions>span,.pilotage-task-quick-actions>.btn{flex:0 0 auto;white-space:nowrap}
.pilotage-task-quick-actions>span{width:auto!important}
.pilotage-category-field{align-self:start;width:100%}

.pilotage-week-scroll,.pilotage-day-layout,.pilotage-day-timeline{min-height:0;height:100%}
.pilotage-week-scroll{overflow-x:auto;overflow-y:hidden;padding:0}
.pilotage-week-scroll .pilotage-week-grid{min-width:700px;height:100%;grid-template-columns:54px repeat(7,minmax(86px,1fr));grid-template-rows:32px 34px repeat(26,minmax(0,1fr));align-items:stretch}
.pilotage-week-grid .week-day-head{min-height:0;padding:3px 2px;line-height:1}
.pilotage-week-grid .week-day-head strong{display:inline;margin:0 0 0 4px;font-size:.82rem}
.pilotage-week-grid .week-allday-label,.pilotage-week-grid .week-allday-cell{min-height:0;overflow:hidden;padding:3px}
.pilotage-week-grid .week-allday-cell{display:flex;flex-direction:row;align-items:center;gap:3px}
.pilotage-week-grid .week-allday-cell .pilotage-event-chip{min-width:0;padding:2px 4px;font-size:.61rem}
.pilotage-time-slot{min-height:0!important;padding:0!important;border:0;border-top:1px solid var(--line);border-radius:0;background:var(--surface);cursor:cell;box-shadow:none!important;transform:none!important}
.pilotage-time-slot.half{border-top-style:dashed;border-top-color:color-mix(in srgb,var(--line) 72%,transparent)}
.pilotage-time-slot:hover,.pilotage-time-slot:focus-visible{position:relative;z-index:2;background:var(--brand-orange-soft);outline:1px solid color-mix(in srgb,var(--brand-orange) 55%,transparent);outline-offset:-1px}
.pilotage-week-grid .week-hour-label{min-height:0;padding:1px 5px;border-top:1px solid var(--line);font-size:.58rem;line-height:1;text-align:right}
.pilotage-week-grid .week-hour-label.half{color:color-mix(in srgb,var(--muted) 65%,transparent);border-top-style:dashed}
.pilotage-timeline-event{position:relative;z-index:4;align-self:stretch;min-height:0;height:auto;margin-top:1px;margin-bottom:1px;padding:2px 5px;overflow:hidden;border-radius:6px;font-size:.65rem;line-height:1.1;box-shadow:0 2px 5px rgba(7,21,45,.1)}
.pilotage-timeline-event>span:last-child{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}

.pilotage-day-layout{grid-template-columns:minmax(0,2fr) minmax(230px,.72fr);gap:10px;align-items:stretch}
.pilotage-day-timeline{display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:repeat(26,minmax(0,1fr));padding:0;overflow:hidden}
.pilotage-day-timeline .day-hour-label{min-height:0;padding:2px 6px;border-top:1px solid var(--line);font-size:.61rem;line-height:1;text-align:right}
.pilotage-day-timeline .day-hour-label.half{color:color-mix(in srgb,var(--muted) 65%,transparent);border-top-style:dashed}
.pilotage-day-timeline .day-hour-slot{grid-column:2}
.pilotage-day-timeline .pilotage-timeline-event{grid-column:2}
.pilotage-day-layout .day-side-panel{min-height:0;height:100%;padding:10px;overflow:auto}
.pilotage-day-layout .day-side-panel h3{margin-bottom:6px;font-size:.8rem}
.pilotage-day-layout .day-unscheduled{display:grid;gap:4px}

@media(min-width:981px){
  #view-pilotage.active{height:100%;min-height:0;overflow:hidden}
  #view-pilotage .pilotage-page{height:100%;min-height:0;max-width:none;padding:10px 14px;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}
  #view-pilotage .pilotage-page-head{min-height:38px;margin-bottom:6px;align-items:center;flex-wrap:nowrap}
  #view-pilotage .pilotage-page-head h2{font-size:1.08rem}
  #view-pilotage .pilotage-page-head p{margin-top:1px;font-size:.72rem;white-space:nowrap}
  #view-pilotage .pilotage-page-head .btn{min-height:32px;padding:5px 9px;font-size:.75rem}
  #view-pilotage .pilotage-subnav{min-height:34px;margin-bottom:6px;padding:3px}
  #view-pilotage .pilotage-subtab{min-height:28px;padding:3px 9px;font-size:.74rem}
  #view-pilotage .pilotage-panel.active{min-height:0}
  #view-pilotage #pilotage-panel-planning.active{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);overflow:hidden}
  #view-pilotage #pilotage-panel-tasks.active{display:block;overflow:auto}
  #view-pilotage .pilotage-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:6px}
  #view-pilotage .pilotage-summary article{grid-template-columns:28px minmax(0,1fr);gap:6px;min-height:42px;padding:5px 8px;border-radius:10px}
  #view-pilotage .pilotage-summary article>.fui-icon{width:26px;height:26px;padding:6px;border-radius:8px}
  #view-pilotage .pilotage-summary small{font-size:.59rem}
  #view-pilotage .pilotage-summary strong{font-size:.96rem;line-height:1}
  #view-pilotage .pilotage-summary em{display:none}
  #view-pilotage .pilotage-calendar-toolbar{min-height:38px;margin-bottom:5px;padding:4px 7px;border-radius:11px;gap:6px}
  #view-pilotage .pilotage-calendar-toolbar .btn,#view-pilotage .pilotage-calendar-toolbar button,#view-pilotage .pilotage-calendar-toolbar select{min-height:28px;height:28px;padding-top:3px;padding-bottom:3px;font-size:.7rem}
  #view-pilotage .pilotage-calendar-toolbar{flex-wrap:nowrap}
  #view-pilotage .pilotage-calendar-toolbar .calendar-title{width:auto;margin-left:auto;font-size:.9rem}
  #view-pilotage .pilotage-legend{gap:8px;margin-bottom:5px;white-space:nowrap;overflow:hidden}
  #view-pilotage .pilotage-legend .state-legend-item{gap:4px;font-size:.65rem}
  #view-pilotage .pilotage-legend .state-legend-dot{width:7px;height:7px}
  #view-pilotage #pilotage-calendar{height:100%;min-height:0;overflow:hidden}
  #view-pilotage .pilotage-month-grid{height:100%;grid-template-rows:22px repeat(6,minmax(0,1fr));gap:4px}
  #view-pilotage .pilotage-month-grid .month-cell{min-height:0;padding:4px;overflow:hidden}
  #view-pilotage .pilotage-month-grid .pilotage-event-chip{padding:2px 5px;font-size:.62rem}
  #view-pilotage .pilotage-month-grid .month-more{font-size:.59rem;line-height:1}
}

@media(min-width:981px) and (max-width:1260px){
  #view-pilotage .pilotage-page-head p{display:none}
}

@media(max-width:980px){
  .pilotage-day-layout{grid-template-columns:1fr;height:auto}
  .pilotage-day-layout .day-side-panel{order:-1;height:auto;max-height:none}
  .pilotage-day-timeline{height:max(620px,calc(100dvh - 220px))}
}

/* ===== V6.73 — tableaux fixes, prise de note et documents du planning ===== */
@media(min-width:981px){
  #view-communications.active,#view-accords.active,#view-cas.active,#view-correspondences.active,#view-cse.active{height:100%;min-height:0;overflow:hidden}
  .fixed-table-page,#view-correspondences .correspondence-page{height:100%;min-height:0;max-width:none;padding:14px 18px;display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:9px;overflow:hidden}
  .fixed-table-page .page-head,#view-correspondences .page-head{margin-bottom:0;align-items:center}
  .fixed-table-page .filters-row,#view-correspondences .correspondence-filters{margin-bottom:0}
  .fixed-table-page .table-heading-row,#view-correspondences .correspondence-summary{min-height:24px;margin:0;align-items:center}
  .fixed-table-page>.table-wrap,#view-correspondences .table-wrap{height:100%;min-height:0;max-width:100%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}
  .fixed-table-page>.table-wrap>table,#view-correspondences .table-wrap>table{width:100%;max-width:100%}
  .fixed-table-page>.table-wrap thead th,#view-correspondences .table-wrap thead th{position:sticky;top:0;z-index:5;box-shadow:0 1px 0 var(--line)}

  #view-pilotage #pilotage-panel-tasks.active{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:6px;overflow:hidden}
  #view-pilotage #pilotage-panel-tasks>.pilotage-task-filters{margin-bottom:0}
  #view-pilotage #pilotage-panel-tasks>.table-heading-row{min-height:22px;margin:0}
  #view-pilotage #pilotage-panel-tasks>.table-wrap{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}

  #view-cse>.content-page{height:100%;min-height:0;max-width:none;padding:14px 18px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:9px;overflow:hidden}
  #view-cse .cse-page-head{margin-bottom:0;align-items:center}
  #view-cse .cse-subnav{margin:0}
  #view-cse .cse-panel.active{min-height:0}
  #view-cse #cse-panel-subjects.active{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:8px;overflow:hidden}
  #view-cse #cse-panel-subjects>.table-heading-row{margin:0}
  #view-cse #cse-panel-subjects>.table-wrap{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}
  #view-cse #cse-panel-subjects>.table-wrap thead th{position:sticky;top:0;z-index:5;box-shadow:0 1px 0 var(--line)}
  #view-cse #cse-panel-dashboard.active{display:block;overflow:auto;overscroll-behavior:contain}
  #view-cse #cse-panel-dashboard .cse-card>.table-wrap{max-height:clamp(220px,34dvh,390px);overflow:auto;overscroll-behavior:contain}
}

.pilotage-meeting-documents-dialog[open]{width:min(800px,calc(100vw - 28px))!important}
.pilotage-meeting-documents-dialog .dialog-head>div{min-width:0;flex:1}
.pilotage-meeting-documents-dialog .dialog-head p{margin:4px 0 0;font-size:.76rem}
.pilotage-meeting-document-groups{display:grid;gap:18px}
.pilotage-meeting-document-group{display:grid;gap:8px}
.pilotage-meeting-document-group h3{display:flex;align-items:center;gap:8px;margin:0;color:var(--ink-2);font-size:.88rem}
.pilotage-meeting-document-group h3 span{display:inline-grid;min-width:24px;height:24px;padding:0 7px;place-items:center;border-radius:999px;background:var(--brand-orange-soft);color:var(--brand-orange-dark);font-size:.7rem}
.pilotage-meeting-document-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.pilotage-meeting-document-row>.fui-icon,.pilotage-meeting-document-row>[data-fui]{width:34px;height:34px;padding:8px;border-radius:10px;background:var(--surface);color:var(--brand-orange)}
.pilotage-meeting-document-row strong,.pilotage-meeting-document-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pilotage-meeting-document-row small{margin-top:3px;color:var(--muted);font-size:.7rem}
.pilotage-meeting-document-actions{display:flex;gap:6px;white-space:nowrap}
.meeting-workspace.meeting-personal-notes-mode .meeting-attendance{display:none}
.meeting-workspace.meeting-personal-notes-mode .meeting-section-toolbar h3{color:var(--brand-orange-dark)}
.meeting-workspace.meeting-personal-notes-mode .meeting-documents-card .meeting-section-toolbar h3{color:var(--ink-2)}
@media(max-width:640px){.pilotage-meeting-document-row{grid-template-columns:32px minmax(0,1fr)}.pilotage-meeting-document-actions{grid-column:2;justify-content:flex-start}.pilotage-meeting-documents-dialog .dialog-foot>span{display:none}}

/* ===== V6.73.1 — Casimir déplaçable et tableaux parfaitement cadrés ===== */
.casimir-character{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.casimir-character img{pointer-events:none;-webkit-user-drag:none}
.casimir-widget.has-custom-position{right:auto!important;bottom:auto!important}
.casimir-widget.is-dragging{transition:none;filter:drop-shadow(0 14px 25px rgba(7,21,45,.32))}
.casimir-widget.is-dragging .casimir-character{cursor:grabbing}
.casimir-chat{transform:translate(var(--casimir-chat-shift-x,0),var(--casimir-chat-shift-y,0))}
.casimir-widget.dock-left .casimir-chat{left:0;right:auto}
.casimir-widget.dock-right .casimir-chat{right:0;left:auto}
.casimir-widget.dock-top .casimir-chat{top:calc(100% + 8px);bottom:auto}
.casimir-widget.dock-bottom .casimir-chat{bottom:calc(100% + 8px);top:auto}

.table-wrap{
  border-radius:15px;
  background-clip:padding-box;
  clip-path:inset(0 round 15px);
  isolation:isolate;
}
.table-wrap thead th:first-child{border-top-left-radius:14px}
.table-wrap thead th:last-child{border-top-right-radius:14px}
.table-wrap tbody tr:last-child td:first-child{border-bottom-left-radius:14px}
.table-wrap tbody tr:last-child td:last-child{border-bottom-right-radius:14px}

@media(min-width:981px){
  .fixed-table-page>.table-wrap,
  #view-correspondences .table-wrap,
  #view-pilotage #pilotage-panel-tasks>.table-wrap,
  #view-cse #cse-panel-subjects>.table-wrap{
    width:100%;
    max-width:100%;
    scrollbar-gutter:stable;
  }
  .fixed-table-page>.table-wrap>table,
  #view-correspondences .table-wrap>table,
  #view-pilotage #pilotage-panel-tasks>.table-wrap>table,
  #view-cse .table-wrap>table{
    width:100%;
    min-width:0;
    table-layout:fixed;
  }
  .fixed-table-page>.table-wrap th,
  .fixed-table-page>.table-wrap td,
  #view-correspondences .table-wrap th,
  #view-correspondences .table-wrap td,
  #view-pilotage #pilotage-panel-tasks>.table-wrap th,
  #view-pilotage #pilotage-panel-tasks>.table-wrap td,
  #view-cse .table-wrap th,
  #view-cse .table-wrap td{
    min-width:0;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .fixed-table-page>.table-wrap .cell-title,
  #view-correspondences .table-wrap .correspondence-date,
  #view-correspondences .table-wrap td:nth-child(2),
  #view-correspondences .table-wrap td:nth-child(3){min-width:0}
  #view-correspondences .table-wrap th button{white-space:normal;overflow-wrap:anywhere}
}

/* ===== V6.73.2 — Médiathèque et Réunions contenues dans l’écran ===== */
@media(min-width:981px){
  #view-media.active,
  #view-meetings.active{
    height:100%;
    min-height:0;
    overflow:hidden;
  }

  #view-media>.content-page{
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    gap:9px;
    width:100%;
    height:100%;
    min-height:0;
    max-width:none;
    padding:14px 18px;
    overflow:hidden;
  }
  #view-media .page-head{
    min-height:0;
    margin:0;
    align-items:center;
  }
  #view-media .media-explorer-toolbar{
    min-height:0;
    margin:0;
  }
  #view-media .media-file-explorer{
    grid-template-columns:clamp(220px,22vw,290px) minmax(0,1fr);
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden;
  }
  #view-media .cse-folder-sidebar,
  #view-media .cse-file-pane{
    height:100%;
    min-height:0;
    overflow:hidden;
  }
  #view-media .cse-folder-sidebar-head,
  #view-media .cse-file-pane-head{
    flex:0 0 auto;
  }
  #view-media .cse-folder-tree{
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  #view-media .media-file-pane{
    flex:1 1 auto;
    width:100%;
    height:auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  #view-media .cse-file-list{
    width:100%;
    max-width:100%;
  }
  #view-media .cse-file-list-head,
  #view-media .cse-file-row{
    grid-template-columns:minmax(0,2fr) minmax(0,.9fr) minmax(78px,.6fr) 68px minmax(132px,1.05fr);
    width:100%;
    min-width:0;
  }
  #view-media .cse-file-row>*{
    min-width:0;
    overflow-wrap:anywhere;
  }
  #view-media .cse-file-actions{
    min-width:0;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  #view-media .cse-file-actions .btn{
    flex:0 0 34px;
  }

  #view-meetings>.meeting-page{
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    gap:9px;
    width:100%;
    height:100%;
    min-height:0;
    max-width:none;
    padding:14px 18px;
    overflow:hidden;
  }
  #view-meetings .page-head{
    min-height:0;
    margin:0;
    align-items:center;
  }
  #view-meetings .meeting-subnav{
    position:relative;
    z-index:10;
    flex:0 0 auto;
    margin:0;
  }
  #view-meetings .meeting-panel.active{
    align-content:start;
    width:100%;
    height:100%;
    min-height:0;
    max-width:100%;
    padding-right:6px;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  #view-meetings .meeting-kpi-grid,
  #view-meetings .meeting-filterbar,
  #view-meetings .meeting-list,
  #view-meetings .meeting-workspace,
  #view-meetings .meeting-report-list,
  #view-meetings .meeting-settings-card{
    width:100%;
    min-width:0;
    max-width:100%;
  }
}

/* ===== V6.74.0 — Sous-tâches du Pilotage ===== */
.pilotage-dot-subtask{background:#4472c4}
.pilotage-task-chip.pilotage-subtask-chip{
  border-left-color:#4472c4;
  background:#e9f1ff;
  color:#214f98;
}
.pilotage-task-chip.pilotage-subtask-chip.state-a_suivre{box-shadow:inset -3px 0 0 var(--purple)}
.pilotage-task-chip.pilotage-subtask-chip.state-termine{box-shadow:inset -3px 0 0 var(--green);opacity:.78}
.pilotage-task-chip.pilotage-subtask-chip.state-retard{box-shadow:inset -3px 0 0 var(--red)}
.pilotage-subtask-marker{display:inline-flex;flex:0 0 auto;margin-right:4px;color:#4472c4;font-weight:950;line-height:1}
.pilotage-subtask-chip .pilotage-subtask-marker{margin-right:0;color:currentColor}
.pilotage-subtask-row td{background:color-mix(in srgb,#e9f1ff 43%,var(--surface))}
.pilotage-subtask-row .cell-title{padding-left:24px}
.pilotage-subtask-row .pilotage-table-title{color:#214f98}
.pilotage-parent-link{color:#4472c4;font-weight:800}
.pilotage-subtask-count{display:inline-flex!important;width:max-content;margin-top:5px!important;padding:2px 7px;border-radius:999px;background:color-mix(in srgb,#4472c4 12%,var(--surface));color:#315f9f!important;font-size:.63rem!important;font-weight:850}
.pilotage-list-subtask{border-color:color-mix(in srgb,#4472c4 35%,var(--line));color:#4472c4}
.pilotage-list-subtask:hover{border-color:#4472c4;background:color-mix(in srgb,#4472c4 9%,var(--surface))}
.pilotage-task-quick-actions .pilotage-subtask-action{color:#315f9f}
.pilotage-parent-field select:not(:disabled){border-color:color-mix(in srgb,#4472c4 30%,var(--line))}
.dashboard-pilotage-state.is-subtask{background:#4472c4}
.dashboard-pilotage-row strong .pilotage-subtask-marker{margin-right:3px}
html[data-theme="dark"] .pilotage-task-chip.pilotage-subtask-chip{background:#172d50;color:#9ec0ff}
html[data-theme="dark"] .pilotage-subtask-row td{background:color-mix(in srgb,#27456f 42%,var(--surface))}
html[data-theme="dark"] .pilotage-subtask-row .pilotage-table-title,html[data-theme="dark"] .pilotage-parent-link{color:#91b8f5}
html[data-theme="dark"] .pilotage-subtask-count{background:rgba(68,114,196,.2);color:#a8c8ff!important}
@media(max-width:720px){.pilotage-month-events:has(.pilotage-subtask-chip)::before{color:#4472c4}}
