/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, Arial, sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ── Écran démarrage ──────────────────────────────────────────────────────── */
#screen-startup {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.startup-card {
  background: white;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
}
.startup-logo {
  font-size: 42px;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}
.startup-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #0f172a;
  text-transform: uppercase;
}
.startup-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 32px;
  margin-top: 4px;
}
#clock-startup {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e293b;
  letter-spacing: .04em;
  margin-bottom: 32px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.form-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  display: block;
  text-align: left;
  margin-bottom: 8px;
}
.type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.type-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 8px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #64748b;
  transition: all .15s;
}
.type-btn-wide  { flex-basis: calc(50% - 5px); }
.type-btn:hover { border-color: #94a3b8; color: #0f172a; }
.type-btn.active[data-type="ROYAN"]    { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.type-btn.active[data-type="CPR"]      { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.type-btn.active[data-type="SGD"]      { border-color: #7c3aed; background: #f5f3ff; color: #6d28d9; }
.type-btn.active[data-type="BISITE"]   { border-color: #d97706; background: #fffbeb; color: #92400e; }
.type-btn.active[data-type="NATIONAL"] { border-color: #be123c; background: #fff1f2; color: #9f1239; }
.type-btn-national { border-color: #fecdd3; }
.type-btn-national:hover { border-color: #be123c; color: #9f1239; }

.startup-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 24px;
  transition: border-color .15s;
  outline: none;
}
.startup-input:focus { border-color: #3b82f6; }

.btn-open {
  width: 100%;
  padding: 16px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s, transform .1s;
}
.btn-open:hover { background: #0f172a; transform: translateY(-1px); }
.btn-open:disabled { background: #94a3b8; cursor: default; transform: none; }

.restore-banner {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  text-align: left;
}
.restore-banner strong { color: #854d0e; }
.restore-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-restore  { flex:1; padding:8px; background:#f59e0b; color:white; border:none; border-radius:6px; font-size:12px; font-weight:700; }
.btn-discard  { flex:1; padding:8px; background:#e2e8f0; color:#475569; border:none; border-radius:6px; font-size:12px; font-weight:700; }

.admin-link {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
}
.admin-link:hover { color: #64748b; }

/* ── Header (écran actif + clôturé) ──────────────────────────────────────── */
#screen-active, #screen-closed {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.crisis-header {
  background: #1e293b;
  color: white;
  padding: 4px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.btn-home-header {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-home-header:hover { background: rgba(255,255,255,.22); }
.crisis-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.badge-ROYAN    { background: #2563eb; color: white; }
.badge-CPR      { background: #dc2626; color: white; }
.badge-SGD      { background: #7c3aed; color: white; }
.badge-BISITE   { background: #d97706; color: white; }
.badge-NATIONAL { background: #be123c; color: white; }

.crisis-header-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.crisis-header-name:hover { border-bottom-color: rgba(255,255,255,.5); }
.body.membre-mode .crisis-header-name { cursor: default; }
.body.membre-mode .crisis-header-name:hover { border-bottom-color: transparent; }

#header-rename-form {
  display: flex; align-items: center; gap: 6px;
}
.header-rename-input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 5px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  padding: 3px 8px;
  font-family: inherit;
  outline: none;
  width: 220px;
}
.header-rename-input:focus { border-color: white; background: rgba(255,255,255,.2); }
.btn-rename-ok, .btn-rename-cancel {
  background: none; border: 1px solid rgba(255,255,255,.4);
  color: white; border-radius: 4px;
  padding: 3px 8px; font-size: 13px; cursor: pointer;
  transition: background .12s;
}
.btn-rename-ok:hover     { background: rgba(255,255,255,.2); }
.btn-rename-cancel:hover { background: rgba(255,100,100,.3); }
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
#timer {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f59e0b;
  letter-spacing: .04em;
  line-height: 1;
}
.timer-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
#clock-active, #clock-closed {
  font-size: 14px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

/* ── Layout principal ─────────────────────────────────────────────────────── */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.panel-left {
  width: 340px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
  overflow-y: auto;
}
.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Panneau gauche — formulaire ─────────────────────────────────────────── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
}
.type-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.type-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all .12s;
  letter-spacing: .04em;
  background: white;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.type-radio-label .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: all .12s;
}
.type-radio-label.sel-INFO     { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; }
.type-radio-label.sel-ACTION   { border-color: #22c55e; background: #f0fdf4; color: #15803d; }
.type-radio-label.sel-ALERTE   { border-color: #ef4444; background: #fef2f2; color: #b91c1c; }
.type-radio-label.sel-DÉCISION { border-color: #8b5cf6; background: #f5f3ff; color: #6d28d9; }
.type-radio-label.sel-RÉUNION  { border-color: #0369a1; background: #f0f9ff; color: #0369a1; }
.btn-reunion-launcher { border-color: #0369a1 !important; color: #0369a1 !important; background: #f0f9ff !important; justify-content: center; }
.btn-reunion-launcher:hover { background: #e0f2fe !important; }
.type-radio-label.sel-INFO     .dot { background: #3b82f6; border-color: #3b82f6; }
.type-radio-label.sel-ACTION   .dot { background: #22c55e; border-color: #22c55e; }
.type-radio-label.sel-ALERTE   .dot { background: #ef4444; border-color: #ef4444; }
.type-radio-label.sel-DÉCISION .dot { background: #8b5cf6; border-color: #8b5cf6; }
.type-radio-label.sel-RÉUNION  .dot { background: #0369a1; border-color: #0369a1; }

#entry-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  transition: border-color .15s;
  outline: none;
  line-height: 1.5;
}
#entry-textarea:focus { border-color: #3b82f6; }
.hint { font-size: 11px; color: #94a3b8; text-align: right; margin-top: -8px; }

.btn-add {
  width: 100%;
  padding: 13px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .15s;
}
.btn-add:hover { background: #1d4ed8; }

.custom-time-row { margin: -2px 0 8px; }
.custom-time-toggle {
  background: none; border: none; padding: 0;
  font-size: 12px; color: #94a3b8; cursor: pointer;
  font-family: inherit; letter-spacing: .01em;
  transition: color .15s;
}
.custom-time-toggle:hover { color: #d97706; }
.custom-time-toggle.active { color: #d97706; font-weight: 700; }
.custom-time-panel {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 8px 10px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px;
}
.custom-time-input {
  padding: 5px 8px; border: 1px solid #fde68a; border-radius: 5px;
  font-size: 13px; font-family: inherit; background: white;
  color: #92400e; outline: none; width: 100px;
}
.custom-time-input:focus { border-color: #d97706; }
.custom-time-hint { font-size: 11px; color: #92400e; font-style: italic; }

.entry-retro-note {
  display: block; font-size: 11px; color: #d97706;
  font-style: italic; margin-top: 3px; font-weight: 600;
}
.entry-validated-by {
  display: inline-block; margin-top: 4px; margin-left: 2px;
  font-size: 11px; color: #16a34a; font-weight: 600;
}
.entry-resolved-by { color: #dc2626; }

.divider { height: 1px; background: #f1f5f9; margin: 4px 0; }

.btn-close-crisis {
  width: 100%;
  padding: 13px;
  background: white;
  color: #dc2626;
  border: 2px solid #fca5a5;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: all .15s;
}
.btn-close-crisis:hover { background: #fef2f2; border-color: #ef4444; }

/* ── Journal (panneau droit) ──────────────────────────────────────────────── */
.journal-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: white;
}
.journal-count { font-size: 12px; color: #94a3b8; font-weight: 600; }
.journal-actions-bar {
  display: flex;
  gap: 8px;
}
.btn-ai {
  padding: 7px 14px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s;
}
.btn-ai:hover { background: #6d28d9; }
.btn-ai-history {
  padding: 7px 10px;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.btn-ai-history:hover { background: #ddd6fe; }
.btn-end-report {
  padding: 7px 14px;
  background: #0369a1;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-end-report:hover { background: #0284c7; }

.btn-retex {
  padding: 7px 14px;
  background: #0f766e;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-retex:hover { background: #0d9488; }

.btn-pdf {
  padding: 7px 14px;
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s;
}
.btn-pdf:hover { background: #1e293b; }

.end-report-header {
  display: flex; align-items: center; gap: 10px;
  background: #e0f2fe; border: 1px solid #bae6fd;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 16px;
  font-size: 13px; font-weight: 700; color: #0369a1;
}
.end-report-badge {
  background: #0369a1; color: white;
  border-radius: 6px; padding: 3px 8px; font-size: 12px;
}

#journal-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.journal-empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
  padding: 48px 20px;
}

/* ── Entrée journal ───────────────────────────────────────────────────────── */
.entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 4px solid transparent;
  background: #f8fafc;
  position: relative;
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.entry-INFO        { border-left-color: #3b82f6; }
.entry-ACTION      { border-left-color: #22c55e; }
.entry-ALERTE      { border-left-color: #ef4444; background: #fef9f9; }
.entry-DÉCISION    { border-left-color: #8b5cf6; background: #faf9ff; }
.entry-RÉOUVERTURE {
  border-left: 4px solid #d97706;
  border-top: 2px dashed #d97706;
  border-bottom: 2px dashed #d97706;
  background: #fffbeb;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
}
.badge-RÉOUVERTURE  { background: #fef3c7; color: #92400e; }
.reopen-marker-icon { font-size: 16px; flex-shrink: 0; }
.reopen-marker-text { color: #92400e; font-size: 13px; font-style: italic; font-weight: 600; }

.entry-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  width: 54px;
  padding-top: 2px;
  gap: 1px;
}
.entry-date {
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: .02em;
}
.entry-time-val {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Séparateurs de jour ─────────────────────────────────────────────────── */
.day-separator {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0 4px; padding: 0 4px;
  color: #94a3b8; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
}
.day-separator::before, .day-separator::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}

.entry-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.entry-time-wide { width: 74px !important; }
.entry-badge.badge-clickable { cursor: pointer; }
.entry-badge.badge-clickable:hover { filter: brightness(.9); }

/* ── Popup sélecteur de type ──────────────────────────────────────────────── */
.type-selector-popup {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 6px;
  display: flex;
  gap: 5px;
}
.type-sel-btn {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 4px 9px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: filter .1s;
}
.type-sel-btn:hover { filter: brightness(.88); }
.badge-INFO     { background: #dbeafe; color: #1d4ed8; }
.badge-ACTION   { background: #dcfce7; color: #15803d; }
.badge-ALERTE   { background: #fee2e2; color: #b91c1c; }
.badge-DÉCISION { background: #ede9fe; color: #6d28d9; }

.entry-author {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
}
.badge-RÉUNION  { background: #e0f2fe; color: #0369a1; }

.entry-meeting-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 5px 12px;
  background: #0369a1;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.entry-meeting-link:hover { background: #0284c7; }

.entry-text { flex: 1; font-size: 14px; line-height: 1.5; color: #1e293b; word-break: break-word; }
.entry-edit-btn {
  opacity: 0;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity .15s, color .15s;
  flex-shrink: 0;
}
.entry:hover .entry-edit-btn { opacity: 1; }
.entry-edit-btn:hover { color: #475569; background: #e2e8f0; }
.btn-entry-wa {
  opacity: 0.35;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.entry:hover .btn-entry-wa { opacity: 1; }
.btn-entry-wa:hover { background: #dcfce7; border-color: #86efac; }
.entry.editable { outline: 2px solid #f59e0b; outline-offset: 1px; }

/* Inline edit dans le journal */
.entry-edit-form { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.entry-edit-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #f59e0b;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  outline: none;
}
.entry-edit-actions { display: flex; gap: 6px; }
.btn-save-edit   { padding:5px 12px; background:#22c55e; color:white; border:none; border-radius:5px; font-size:12px; font-weight:700; }
.btn-cancel-edit { padding:5px 12px; background:#e2e8f0; color:#475569; border:none; border-radius:5px; font-size:12px; font-weight:700; }

/* ── Écran clôturé ────────────────────────────────────────────────────────── */
.closed-banner {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.closed-info { font-size: 13px; color: #166534; }
.closed-info strong { font-weight: 700; font-size: 15px; }
.closed-buttons { display: flex; gap: 8px; }
.btn-reopen-crisis {
  padding: 8px 16px;
  background: #d97706;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}
.btn-reopen-crisis:hover { background: #b45309; }
.btn-new-crisis {
  padding: 8px 16px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}
.closed-journal {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Modal IA ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: #0f172a; }
.modal-close { background: none; border: none; font-size: 20px; color: #94a3b8; line-height: 1; padding: 4px; }
.modal-close:hover { color: #475569; }
.btn-contacts-header {
  background: none; border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.btn-contacts-header:hover { background: rgba(255,255,255,.12); color: white; }
.btn-contact-notified {
  flex-shrink: 0; padding: 6px 13px; border-radius: 7px; border: none;
  background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: inherit; transition: all .15s; white-space: nowrap;
}
.btn-contact-notified:hover { background: #bbf7d0; }
.btn-print-summary {
  background: none; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 5px 11px; font-size: 12px; color: #475569; cursor: pointer;
  font-family: inherit; transition: all .12s;
}
.btn-print-summary:hover { background: #f1f5f9; border-color: #94a3b8; color: #1e293b; }
.btn-meeting-send { background: #eff6ff !important; border-color: #2563eb !important; color: #2563eb !important; }
.btn-meeting-send:hover { background: #dbeafe !important; }
.btn-summary-mail { background: #eff6ff !important; border-color: #2563eb !important; color: #2563eb !important; }
.btn-summary-mail:hover { background: #dbeafe !important; }
.btn-summary-wa { background: #f0fdf4 !important; border-color: #16a34a !important; color: #16a34a !important; }
.btn-summary-wa:hover { background: #dcfce7 !important; }
.btn-summary-history { background: #f5f3ff !important; border-color: #4f46e5 !important; color: #4f46e5 !important; }
.btn-summary-history:hover { background: #ede9fe !important; }
.summary-hist-item { border:1px solid #e2e8f0; border-radius:10px; padding:14px 16px; margin-bottom:10px; cursor:pointer; transition:background .15s; }
.summary-hist-item:hover { background:#f8fafc; border-color:#4f46e5; }
.summary-hist-meta { font-size:12px; font-weight:700; color:#4f46e5; margin-bottom:6px; }
.summary-hist-preview { font-size:13px; color:#475569; line-height:1.5; }
.summary-hist-badge { display:inline-block; background:#ede9fe; color:#6d28d9; font-size:10px; font-weight:800; padding:2px 7px; border-radius:10px; margin-left:6px; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}
.modal-body h2 { font-size: 15px; font-weight: 700; color: #0f172a; margin: 20px 0 8px; }
.modal-body h2:first-child { margin-top: 0; }
.modal-body ul { padding-left: 20px; margin: 6px 0; }
.modal-body li { margin: 4px 0; }
.modal-loading { text-align: center; padding: 40px; color: #64748b; }
.modal-spinner {
  width: 40px; height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  transform: translateY(20px);
  opacity: 0;
  transition: all .25s;
  max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
#toast.toast-ok   { background: #16a34a; }
#toast.toast-warn { background: #d97706; }
#toast.toast-err  { background: #dc2626; }

/* ── Modale confirmation clôture ─────────────────────────────────────────── */
.confirm-box {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.confirm-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.confirm-box p  { font-size: 14px; color: #64748b; margin-bottom: 24px; line-height: 1.5; }
.confirm-buttons { display: flex; gap: 10px; }
.btn-confirm-close { flex:1; padding:12px; background:#dc2626; color:white; border:none; border-radius:8px; font-weight:700; font-size:14px; }
.btn-confirm-cancel { flex:1; padding:12px; background:#e2e8f0; color:#475569; border:none; border-radius:8px; font-weight:700; font-size:14px; }

/* ── Login overlay ────────────────────────────────────────────────────────── */
#login-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-card h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.login-card p  { font-size: 13px; color: #64748b; margin-bottom: 24px; }
.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color .15s;
}
.login-input:focus { border-color: #2563eb; }
.login-error { color: #dc2626; font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.btn-login {
  width: 100%;
  padding: 14px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s;
}
.btn-login:hover { background: #0f172a; }

/* ── Bandeau récap ────────────────────────────────────────────────────────── */
.recap-indicator {
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
  padding: 0 4px;
  margin-top: 2px;
}
.wa-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.wa-status-badge.wa-ready       { background: #dcfce7; color: #15803d; }
.wa-status-badge.wa-connecting  { background: #fef9c3; color: #92400e; }
.wa-status-badge.wa-disconnected{ background: #fee2e2; color: #b91c1c; }

/* ── Panneau membres ──────────────────────────────────────────────────────── */
.members-toggle {
  width: 100%;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .12s;
}
.members-toggle:hover { border-color: #94a3b8; color: #1e293b; }
.members-toggle.has-members { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; }
.members-badge {
  background: #3b82f6;
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.members-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 8px 8px;
  border-top: none;
  margin-top: -2px;
  padding: 10px 12px;
}
.members-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: background .1s;
}
.member-item:hover { background: #e2e8f0; }
.member-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; accent-color: #2563eb; }
.member-name { font-size: 13px; font-weight: 600; color: #1e293b; flex: 1; }
.member-email-small { font-size: 11px; color: #94a3b8; }
.member-item.selected { background: #eff6ff; }
.member-item.selected .member-name { color: #1d4ed8; }

.members-custom-form { display: flex; gap: 6px; margin-bottom: 10px; }
.members-custom-input {
  flex: 1; padding: 7px 10px;
  border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 12px; outline: none;
}
.members-custom-input:focus { border-color: #3b82f6; }
.btn-add-custom-member {
  padding: 7px 10px; background: #2563eb; color: white;
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700;
  white-space: nowrap; cursor: pointer;
}
.btn-add-custom-member:hover { background: #1d4ed8; }

/* ── Panneau membres au démarrage ──────────────────────────────────────────── */
#startup-members-panel { margin-bottom: 20px; text-align: left; }
#startup-members-panel .form-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.startup-members-badge {
  background: #2563eb; color: white;
  font-size: 11px; font-weight: 800;
  padding: 1px 8px; border-radius: 10px; min-width: 22px; text-align: center;
}
.startup-members-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; max-height: 180px; overflow-y: auto;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 6px; margin-bottom: 0;
}
.startup-members-grid .member-item { padding: 5px 6px; }
.permanent-badge {
  font-size: 9px; font-weight: 800; letter-spacing: .04em;
  background: #fef3c7; color: #92400e;
  padding: 1px 5px; border-radius: 4px;
  text-transform: uppercase; flex-shrink: 0;
}

.selected-members-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.member-tag {
  display: flex; align-items: center; gap: 4px;
  background: #dbeafe; color: #1d4ed8;
  padding: 3px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 700;
}
.member-tag-remove {
  background: none; border: none; color: #3b82f6;
  font-size: 13px; cursor: pointer; padding: 0; line-height: 1;
}
.member-tag-remove:hover { color: #dc2626; }
.members-empty { font-size: 12px; color: #94a3b8; text-align: center; padding: 8px 0; }

/* ── Déconnexion ─────────────────────────────────────────────────────────── */
.btn-logout {
  background: none;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.btn-logout:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

.btn-logout-header {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
  text-transform: uppercase;
}
.btn-logout-header:hover { background: rgba(220,38,38,.35); color: white; border-color: rgba(220,38,38,.5); }

/* ── Mode lecture seule (compte MEMBRE) ──────────────────────────────────── */
body.membre-mode .panel-left .type-radios,
body.membre-mode .panel-left .section-title-saisie,
body.membre-mode .panel-left #entry-textarea,
body.membre-mode .panel-left .custom-time-row,
body.membre-mode .panel-left .btn-add,
body.membre-mode .panel-left .divider,
body.membre-mode .panel-left .btn-close-crisis,
body.membre-mode .panel-left .members-custom-form,
body.membre-mode .panel-left .btn-add-custom-member { display: none !important; }
body.membre-mode .panel-left .members-list input[type="checkbox"] { pointer-events: none; opacity: .5; }
body.membre-mode .panel-right { flex: 1 !important; }
body.membre-mode .btn-reopen-crisis { display: none !important; }
body.membre-mode .btn-retex { display: none !important; }
body.membre-mode .btn-new-crisis { display: none !important; }
body.membre-mode .btn-discard { display: none !important; }
body.membre-mode .btn-ai { display: none !important; }

#membre-notice { display: none; }
body.membre-mode #membre-notice { display: block !important; }
body.membre-mode #startup-form { display: none !important; }

.membre-notice {
  background: #e0f2fe;
  border: 2px solid #7dd3fc;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 16px;
  text-align: center;
}

/* Indicateur de rôle dans le header */
.role-indicator {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
}

/* ── Print / Export PDF ───────────────────────────────────────────────────── */
@media print {
  #screen-startup, #screen-active .panel-left,
  .journal-header, .crisis-header .header-right,
  #modal-ai, #toast, #confirm-modal { display: none !important; }

  body { background: white; }
  .crisis-header {
    background: #1e293b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 16px 20px;
  }
  .main-layout { display: block; height: auto; overflow: visible; }
  .panel-right { overflow: visible; }
  #journal-list { overflow: visible; }
  #screen-closed { min-height: auto; }
  .closed-journal { overflow: visible; }
  .closed-banner .closed-buttons { display: none; }

  .entry { break-inside: avoid; }
  .entry-INFO     { border-left-color: #3b82f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entry-ACTION   { border-left-color: #22c55e !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entry-ALERTE   { border-left-color: #ef4444 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entry-DÉCISION { border-left-color: #8b5cf6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entry-edit-btn { display: none; }
}

.panel-doc-link {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}
.panel-doc-btn {
  font-size: 12px; color: #64748b; text-decoration: none;
  padding: 5px 12px; border-radius: 6px; border: 1px solid #e2e8f0;
  transition: all .15s; display: inline-block;
}

/* ── Correcteur orthographe ──────────────────────────────────────────────── */
.btn-correct {
  background: none; border: 1px solid #e2e8f0;
  color: #64748b; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 6px;
  cursor: pointer; transition: all .15s;
}
.btn-correct:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
.btn-correct:disabled { opacity: .4; cursor: default; }

.btn-mic {
  background: none; border: 1px solid #e2e8f0;
  color: #64748b; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 6px;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 5px;
}
.btn-mic:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
.btn-mic-active {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  color: #dc2626 !important;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
}
.btn-import-msg {
  width: 100%; margin-top: 8px;
  background: none; border: 1px dashed #cbd5e1;
  color: #64748b; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-import-msg:hover { background: #f8fafc; border-color: #94a3b8; color: #1e293b; }
.btn-import-msg-action {
  padding: 8px 16px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .15s;
  background: #1e293b; color: white;
}
.btn-import-msg-action:hover { background: #0f172a; }
.btn-import-msg-action:disabled { opacity: .5; cursor: default; }
.btn-import-msg-raw { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-import-msg-raw:hover { background: #e2e8f0; color: #1e293b; }
.entry-attachment {
  display: inline-block; margin-top: 5px; margin-left: 0;
  font-size: 11px; font-weight: 700; color: #2563eb;
  background: #dbeafe; border-radius: 5px; padding: 2px 8px;
  text-decoration: none; transition: background .12s;
}
.entry-attachment:hover { background: #bfdbfe; }

/* Icônes compactes sur la ligne */
.entry-icon-ext,
.entry-icon-att {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  margin-right: 4px; flex-shrink: 0;
  cursor: default;
}
.entry-icon-att {
  text-decoration: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity .12s;
}
.entry-icon-att:hover { opacity: 1; }

/* ── Recherche dans le journal ───────────────────────────────────────────── */
.journal-search-row { padding: 8px 16px 4px; }
.journal-search-input {
  width: 100%; padding: 7px 12px; font-size: 13px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc;
  outline: none; transition: border-color .15s;
}
.journal-search-input:focus { border-color: #94a3b8; background: white; }
.entry.hidden-by-search { display: none; }

/* ── Barre de filtre actif ───────────────────────────────────────────────── */
#active-filter-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fef2f2; border: 1.5px solid #fca5a5;
  border-radius: 8px; margin: 6px 0 2px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: #b91c1c;
}
#active-filter-bar .filter-bar-icon { font-size: 15px; }
#active-filter-bar .filter-bar-label { flex: 1; }
#active-filter-bar .filter-bar-count {
  background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 10px; letter-spacing: .03em;
}
#active-filter-bar .filter-bar-close {
  background: none; border: 1.5px solid #fca5a5; border-radius: 6px;
  color: #b91c1c; font-size: 12px; font-weight: 700;
  padding: 2px 10px; cursor: pointer; transition: background .15s;
}
#active-filter-bar .filter-bar-close:hover { background: #fee2e2; }

/* ── Conseils plan blanc ─────────────────────────────────────────────────── */
.btn-advice {
  background: rgba(139,92,246,.25); border: 1px solid rgba(139,92,246,.4);
  color: rgba(255,255,255,.9); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; padding: 5px 10px; border-radius: 6px;
  cursor: pointer; transition: all .15s; text-transform: uppercase;
}
.btn-advice:hover { background: rgba(139,92,246,.5); }
body.membre-mode .btn-advice { display: none !important; }

.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-card {
  border-radius: 10px; padding: 12px 14px;
  border-left: 4px solid #e2e8f0; background: #f8fafc;
  transition: opacity .2s;
}
.advice-card.dismissed { opacity: .35; pointer-events: none; }
.advice-card.advice-URGENT    { border-left-color: #ef4444; background: #fff5f5; }
.advice-card.advice-IMPORTANT { border-left-color: #f59e0b; background: #fffbeb; }
.advice-card.advice-SURVEILLANCE { border-left-color: #3b82f6; background: #eff6ff; }
.advice-priority {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 10px;
  margin-right: 8px;
}
.advice-URGENT    .advice-priority { background: #fee2e2; color: #dc2626; }
.advice-IMPORTANT .advice-priority { background: #fef3c7; color: #d97706; }
.advice-SURVEILLANCE .advice-priority { background: #dbeafe; color: #2563eb; }
.advice-text { font-size: 13px; color: #1e293b; font-weight: 600; display: block; margin: 6px 0 4px; }
.advice-source { font-size: 11px; color: #64748b; font-style: italic; }
.advice-actions { margin-top: 8px; display: flex; gap: 8px; }
.btn-advice-apply {
  padding: 5px 12px; background: #1e293b; color: white;
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background .12s;
}
.btn-advice-apply:hover { background: #0f172a; }
.btn-advice-dismiss {
  padding: 5px 10px; background: none; color: #94a3b8;
  border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px;
  cursor: pointer; transition: all .12s;
}
.btn-advice-dismiss:hover { background: #f1f5f9; color: #64748b; }
.panel-doc-btn:hover { color: #1e293b; border-color: #94a3b8; background: #f8fafc; }

/* ── Bandeau point d'étape horaire ─────────────────────────────────────────── */
.checkpoint-banner {
  margin: 0 0 10px 0;
  animation: checkpointSlideIn .35s ease;
}
.checkpoint-banner.hidden { display: none; }

@keyframes checkpointSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.checkpoint-banner-inner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 3px 12px rgba(245,158,11,.25);
}

.checkpoint-icon {
  font-size: 28px; flex-shrink: 0;
  animation: checkpointPulse 1.2s ease-in-out 3;
}

@keyframes checkpointPulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

.checkpoint-text {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.checkpoint-text strong {
  font-size: 15px; color: #92400e; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.checkpoint-text span {
  font-size: 13px; color: #78350f;
}

.checkpoint-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}

.btn-checkpoint-log {
  padding: 8px 16px;
  background: #f59e0b; color: white;
  border: none; border-radius: 7px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .12s;
  white-space: nowrap;
}
.btn-checkpoint-log:hover { background: #d97706; }

.btn-checkpoint-close {
  padding: 8px 12px;
  background: none; color: #92400e;
  border: 1.5px solid #fbbf24; border-radius: 7px;
  font-size: 13px; cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.btn-checkpoint-close:hover { background: #fef3c7; }

.btn-presence-panel {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .1s;
  background: #f0f9ff;
  color: #0369a1;
}
.btn-presence-panel:hover { background: #e0f2fe; transform: translateY(-1px); }
.btn-transcript {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .1s;
  background: #f5f3ff;
  color: #7c3aed;
}
.btn-transcript:hover { background: #ede9fe; transform: translateY(-1px); }

.btn-checkpoint-toggle {
  padding: 6px 12px;
  background: #f0fdf4; color: #166534;
  border: 1.5px solid #86efac; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.btn-checkpoint-toggle:hover { background: #dcfce7; }
.btn-checkpoint-toggle.checkpoint-toggle-off {
  background: #f9fafb; color: #6b7280;
  border-color: #d1d5db;
}
.btn-checkpoint-toggle.checkpoint-toggle-off:hover { background: #f3f4f6; }

/* ── Toggle bruit transcription ─────────────────────────────────────────────── */
.btn-noise-toggle {
  padding: 6px 12px;
  background: #fefce8; color: #854d0e;
  border: 1.5px solid #fde047; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.btn-noise-toggle:hover { background: #fef08a; }

/* Panneau domaines d'impact */
.domain-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.domain-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: background .15s;
}
.domain-checkbox-label:hover { background: #f1f5f9; }
.domain-checkbox-label.domain-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 500;
}
.domain-checkbox-label input[type="checkbox"] { accent-color: #3b82f6; }
.btn-all-domains {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
}
.btn-all-domains:hover { background: #f1f5f9; }

/* Entrée bruit (visible quand toggle ON) */
.entry.entry-noise {
  opacity: 0.45;
  font-style: italic;
}
.entry.entry-noise:hover { opacity: 0.75; }
.entry.entry-noise .entry-badge { background: #e5e7eb; color: #9ca3af; border-color: #d1d5db; }

/* ── Bande renforts disponibles ─────────────────────────────────────────────── */
.helpers-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #162032;
  border-bottom: 2px solid #1e3a5f;
  padding: 7px 20px;
}

.helpers-label {
  font-size: 12px; font-weight: 800; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .07em;
  white-space: nowrap; flex-shrink: 0;
}

.helpers-chips {
  display: flex; flex-wrap: wrap; gap: 7px; flex: 1; align-items: center;
}

.helpers-empty {
  font-size: 12px; color: #475569; font-style: italic;
}

.helper-chip {
  display: inline-flex; align-items: center; gap: 0;
  background: #16a34a; border: none;
  border-radius: 20px; overflow: hidden;
  animation: helperFadeIn .2s ease;
}
@keyframes helperFadeIn {
  from { opacity:0; transform:scale(.85); }
  to   { opacity:1; transform:scale(1); }
}

.helper-name {
  font-size: 13px; font-weight: 700; color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
}

.btn-helper-take {
  background: #15803d; color: white;
  border: none; border-left: 1px solid #166534;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  cursor: pointer; white-space: nowrap;
  transition: background .12s;
}
.btn-helper-take:hover { background: #166534; }

.btn-helper-remove {
  background: none; color: rgba(255,255,255,.7);
  border: none; border-left: 1px solid rgba(255,255,255,.2);
  font-size: 14px; padding: 4px 9px; line-height: 1;
  cursor: pointer; transition: color .12s, background .12s;
}
.btn-helper-remove:hover { background: #dc2626; color: white; }

.helpers-add {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
}
.helper-input {
  background: #1e293b; color: #e2e8f0;
  border: 1.5px solid #334155; border-radius: 6px;
  padding: 5px 11px; font-size: 12px;
  outline: none; width: 140px;
  transition: border-color .15s;
}
.helper-input:focus { border-color: #22c55e; }
.helper-input::placeholder { color: #475569; }

.btn-helper-add {
  background: #166534; color: #bbf7d0;
  border: 1.5px solid #22c55e; border-radius: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
}
.btn-helper-add:hover { background: #22c55e; color: #052e16; }

/* ── Onglets mobile ────────────────────────────────────────────────────────── */
.mobile-tabs {
  display: none;
}

@media (max-width: 768px) {
  /* ── Onglets ── */
  .mobile-tabs {
    display: flex;
    background: #1e293b;
    border-bottom: 2px solid #334155;
    flex-shrink: 0;
  }
  .mobile-tab {
    flex: 1;
    padding: 10px 4px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s, border-bottom .15s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .mobile-tab.active {
    color: #38bdf8;
    border-bottom: 3px solid #38bdf8;
    background: rgba(56,189,248,.07);
  }
  .mobile-collapse-btn {
    flex: 0 0 36px;
    font-size: 14px;
    border-left: 1px solid #334155;
  }

  /* ── Layout ── */
  .main-layout {
    flex-direction: column;
    overflow: auto;
  }
  .panel-left {
    width: 100% !important;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    max-height: none;
    overflow-y: visible;
  }
  .panel-right {
    overflow: auto;
    min-height: 300px;
  }
  .panel-left.mobile-hidden,
  .panel-right.mobile-hidden {
    display: none !important;
  }

  /* ── Header : 2 lignes sur mobile ── */
  .crisis-header {
    padding: 4px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .header-left {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
  }
  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
  }
  /* Cacher les boutons secondaires */
  .btn-home-header { display: none !important; }
  .btn-logout-header { display: none !important; }
  /* Boutons essentiels plus compacts */
  .btn-advice, .btn-contacts-header {
    font-size: 12px;
    padding: 5px 10px;
  }
  /* Badge + nom de crise bien visibles */
  .crisis-badge {
    font-size: 12px;
    padding: 3px 8px;
  }
  .crisis-header-name {
    font-size: 14px;
    font-weight: 700;
  }

  /* ── Bouton collapse dans les onglets ── */
  .mobile-collapse-btn {
    flex: 0 0 44px !important;
    font-size: 16px !important;
    color: #94a3b8 !important;
    border-left: 1px solid #334155;
    transition: transform .2s;
  }
  .mobile-collapsed .mobile-collapse-btn { transform: rotate(180deg); color: #38bdf8 !important; }

  /* ── Zone collapsible ── */
  #mobile-collapsible-zone,
  #journal-header-collapsible {
    overflow: hidden;
    transition: max-height .3s ease, opacity .3s ease;
    max-height: 400px;
    opacity: 1;
  }
  .mobile-collapsed #mobile-collapsible-zone,
  .mobile-collapsed #journal-header-collapsible {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
  }

  /* ── Helpers strip compact ── */
  .helpers-strip {
    flex-wrap: wrap;
    padding: 6px 12px;
    gap: 6px;
  }
  .helper-input {
    width: 120px;
    flex: 1;
    min-width: 100px;
  }
  .btn-helper-add {
    flex-shrink: 0;
  }

  /* ── Journal entries — mobile ── */
  .entry {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 10px;
  }
  .entry-time {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    order: 1;
  }
  .entry-date { font-size: 10px; }
  .entry-time-val { font-size: 11px; }
  .entry-badge {
    order: 2;
    font-size: 10px;
  }
  .entry-text {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    min-width: 0;
    font-size: 13px;
  }
  .entry-done-btn, .btn-entry-wa, .entry-edit-btn {
    order: 4;
    opacity: 1 !important;
  }
  .btn-entry-wa { opacity: 1 !important; }

  /* ── Journal header mobile — colonne + barre scrollable ── */
  .journal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 12px 0;
  }
  /* Ligne 1 : titre + MODE + Classifier */
  .journal-header > div:first-child {
    width: 100%;
    padding-bottom: 6px;
  }
  /* Ligne 2 : count + badges — masquée sur mobile (info dans la barre scrollable) */
  .journal-header > div:last-child {
    width: 100%;
    margin-left: 0 !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 0;
  }
  /* Counts + badges restent visibles en ligne */
  .journal-header > div:last-child > .journal-count,
  .journal-header > div:last-child > .actions-pending-badge,
  .journal-header > div:last-child > .next-reunion-badge {
    display: inline-flex;
  }
  /* Barre d'actions : scroll horizontal, une seule ligne */
  .journal-actions-bar {
    width: calc(100% + 24px);
    margin-left: -12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 6px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    scrollbar-width: none;
  }
  .journal-actions-bar::-webkit-scrollbar { display: none; }
  .btn-meeting-report, .btn-ai-history, .btn-checkpoint-toggle,
  .btn-email-alerts-toggle, .btn-noise-toggle, .btn-trash-toggle,
  .btn-activity-log, .btn-classify-transcripts {
    font-size: 11px;
    padding: 5px 9px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 5px;
  }
  .btn-meeting-report { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
  .btn-activity-log { border: 1px solid #e2e8f0; }

  /* ── Minuteur mobile ── */
  .crisis-timer { font-size: 40px; }

  /* ── Modals full screen mobile ── */
  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-overlay {
    align-items: flex-end !important;
  }

  /* ── Pilotage / Dashboard — lignes sur mobile ── */
  .db-row {
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 8px 6px;
    align-items: center;
  }
  /* Ligne 1 : heure + badge type + code + auteur */
  .db-time { order: 1; flex-shrink: 0; }
  .entry-badge.db-type-badge { order: 2; flex-shrink: 0; }
  .db-code-badge { order: 3; flex-shrink: 0; font-size: 10px; }
  .db-author-badge { order: 4; flex-shrink: 0; font-size: 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Ligne 2 : texte complet */
  .db-text { order: 5; width: 100%; flex-basis: 100%; font-size: 13px; line-height: 1.5; }
  .db-inline-edit { order: 5; width: 100%; flex-basis: 100%; }
  .db-edited-badge { order: 5; font-size: 10px; }
  /* Ligne 3 : boutons d'action — toujours visibles sur mobile (pas de hover) */
  .btn-action-done, .btn-alert-resolve, .db-ack-btn {
    order: 6; flex-shrink: 0; font-size: 11px; padding: 4px 8px;
  }
  .db-assign-btn, .db-assign-badge { order: 7; flex-shrink: 0; font-size: 11px; }
  .btn-entry-wa.db-wa { order: 8; flex-shrink: 0; }
  .db-doneby { order: 9; flex-shrink: 0; font-size: 11px; }
  /* Boutons cachés au hover → toujours visibles sur mobile */
  .db-edit-btn, .db-dup-btn, .db-del-btn,
  .btn-split-entry.db-hover-btn, .btn-merge-entry {
    opacity: 1 !important;
    order: 10;
    flex-shrink: 0;
    font-size: 11px;
    padding: 3px 6px;
  }
  /* Blocs pilotage */
  .db-block { margin-bottom: 10px; border-radius: 8px; }
  .db-block-title { font-size: 13px; padding: 8px 10px; }
  #dashboard-view { padding: 8px; }
  .db-search-row { padding: 6px 8px; }
  .db-member-filter { flex-wrap: wrap; gap: 4px; padding: 4px 8px; }
  .db-member-chip { font-size: 11px; padding: 3px 8px; }
}

/* ── Conseils IA — groupement par service ──────────────────────────────────── */
.advice-service-group {
  margin-bottom: 18px;
}
.advice-service-header {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #0369a1;
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
  padding: 5px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
}
.advice-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* ── Étape sélection domaines (modal Conseils) ───────────────────────────── */
.advice-domain-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.advice-domain-hint {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}
.advice-domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.advice-domain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.advice-domain-item input[type=checkbox] { display: none; }
.advice-domain-item.checked {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
  font-weight: 600;
}
.advice-domain-item:hover { border-color: #a78bfa; }
.btn-launch-advice {
  align-self: flex-end;
  padding: 10px 24px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-launch-advice:hover { background: #6d28d9; }

/* ── Boutons Fiches de mission + Communiquer ─────────────────────────────── */
.btn-mission, .btn-communicate {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .1s;
}
.btn-mission {
  background: #ede9fe;
  color: #5b21b6;
}
.btn-mission:hover { background: #ddd6fe; transform: translateY(-1px); }
.btn-communicate {
  background: #ecfdf5;
  color: #065f46;
}
.btn-communicate:hover { background: #d1fae5; transform: translateY(-1px); }

.btn-visio {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .1s;
  background: #eff6ff;
  color: #1d4ed8;
}
.btn-visio:hover { background: #dbeafe; transform: translateY(-1px); }

/* ── Bande visio planifiée ───────────────────────────────────────────────── */
.visio-strip {
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.visio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 12px;
}
.visio-icon { font-size: 20px; flex-shrink: 0; }
.visio-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.visio-label { font-size: 13px; font-weight: 700; color: #1e3a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visio-time  { font-size: 11px; color: #3b82f6; font-weight: 600; }
.btn-visio-join {
  padding: 6px 14px;
  background: #2563eb; color: white;
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background .12s;
}
.btn-visio-join:hover { background: #1d4ed8; }
.btn-visio-edit {
  background: none; border: none;
  font-size: 15px; cursor: pointer;
  color: #94a3b8; padding: 4px;
  flex-shrink: 0;
}
.btn-visio-edit:hover { color: #475569; }
.btn-visio-end {
  background: none; border: 1px solid #0f766e;
  border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; color: #0f766e; padding: 3px 8px;
  flex-shrink: 0; transition: all .12s;
}
.btn-visio-end:hover { background: #0f766e; color: #fff; }

/* ── Bandeau rappel visio ────────────────────────────────────────────────── */
.visio-reminder-banner {
  background: #1d4ed8;
  color: white;
  animation: checkpointSlideIn .35s ease;
}
.visio-reminder-banner.hidden { display: none; }
.visio-reminder-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  max-width: 900px;
  margin: 0 auto;
}
.visio-reminder-icon { font-size: 28px; animation: checkpointPulse 1.2s ease-in-out 3; }
.visio-reminder-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.visio-reminder-text strong { font-size: 15px; }
.visio-reminder-text span { font-size: 13px; opacity: .85; }
.visio-reminder-actions { display: flex; gap: 10px; align-items: center; }
.btn-visio-reminder-join {
  padding: 8px 18px;
  background: white; color: #1d4ed8;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  transition: background .12s;
}
.btn-visio-reminder-join:hover { background: #dbeafe; }
.btn-visio-reminder-close {
  padding: 8px 12px;
  background: none; color: rgba(255,255,255,.8);
  border: 1.5px solid rgba(255,255,255,.4); border-radius: 8px;
  font-size: 13px; cursor: pointer;
  transition: all .12s; white-space: nowrap;
}
.btn-visio-reminder-close:hover { background: rgba(255,255,255,.1); }

/* ── Modal visio ─────────────────────────────────────────────────────────── */
.visio-modal-label {
  display: block; font-size: 12px; font-weight: 700;
  color: #475569; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 6px;
}
.visio-modal-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; font-family: inherit;
  outline: none; box-sizing: border-box;
  transition: border-color .12s;
}
.visio-modal-input:focus { border-color: #2563eb; }
.btn-visio-save {
  padding: 9px 20px; background: #2563eb; color: white;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .12s;
}
.btn-visio-save:hover { background: #1d4ed8; }
.btn-visio-cancel {
  padding: 9px 16px; background: #f1f5f9; color: #475569;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s;
}
.btn-visio-cancel:hover { background: #e2e8f0; }
.btn-visio-delete {
  padding: 9px 14px; background: #fee2e2; color: #b91c1c;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s; margin-right: auto;
}
.btn-visio-delete:hover { background: #fecaca; }

/* ── Bouton CR Réunion (journal header) ──────────────────────────────────── */
.btn-meeting-report {
  padding: 6px 12px;
  border: none;
  border-radius: 7px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-meeting-report:hover { background: #fde68a; }

/* ── Bouton bascule vue ──────────────────────────────────────────────────── */
.mode-switcher {
  position: relative;
}
.mode-switcher-btn {
  padding: 5px 12px;
  border: 2px solid #6366f1;
  border-radius: 7px;
  background: #fff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.mode-switcher-btn:hover { background: #eef2ff; }
.mode-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  min-width: 140px;
  overflow: hidden;
}
.mode-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.mode-option:hover { background: #f1f5f9; }
.mode-option.active {
  background: #eef2ff;
  color: #4338ca;
}
.btn-classify-transcripts {
  padding: 5px 12px;
  border: 2px solid #d97706;
  border-radius: 7px;
  background: #fff;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-classify-transcripts:hover { background: #fef3c7; }
.btn-classify-transcripts:disabled { opacity: .6; cursor: wait; }

.btn-split-entry {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #c4b5fd;
  border-radius: 4px;
  background: #f5f3ff;
  color: #6d28d9;
  cursor: pointer;
  white-space: nowrap;
}
.btn-split-entry:hover { background: #ede9fe; }
.db-doneby {
  flex-shrink: 0;
  font-size: 11px;
  color: #15803d;
  font-weight: 700;
  white-space: nowrap;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  padding: 1px 7px;
}
.db-done-section-title {
  font-size: 11px; font-weight: 700; color: #15803d;
  padding: 6px 4px 2px; border-top: 1px solid #d1fae5; margin-top: 6px;
}

/* ── Tableau de bord ─────────────────────────────────────────────────────── */
#dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}
.db-block {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
}
.db-block-alert  { background: #fff5f5; border-color: #fca5a5; }
.db-block-action { background: #f0fdf4; border-color: #86efac; }
.db-block-decision { background: #f5f3ff; border-color: #c4b5fd; }
.db-block-info   { background: #f8fafc; border-color: #e2e8f0; }

.db-block-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.db-block-title--toggle {
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  padding: 3px 4px;
  margin: -3px -4px 10px;
  transition: background .12s;
}
.db-block-title--toggle:hover { background: rgba(0,0,0,.05); }
.db-block-chevron { font-size: 11px; opacity: .6; flex-shrink: 0; }
.db-block-alert .db-block-title    { color: #b91c1c; }
.db-block-action .db-block-title   { color: #15803d; }
.db-block-decision .db-block-title { color: #6d28d9; }
.db-block-info .db-block-title     { color: #475569; }

.db-count {
  background: rgba(0,0,0,.1);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}
.db-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,.05);
  font-size: 13px;
  color: #1e293b;
  line-height: 1.4;
}
.db-row:last-child { border-bottom: none; }
.db-row-done { opacity: .55; }
.db-time {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}
.db-text { flex: 1; }
.db-edit-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.db-row:hover .db-edit-btn { opacity: 1; }
.db-dup-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  color: #6366f1;
}
.db-row:hover .db-dup-btn { opacity: 1; }
.db-dup-btn:hover { background: #ede9fe; border-color: #a5b4fc; }
.btn-task-comment {
  flex-shrink: 0;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  line-height: 1;
}
.btn-task-comment:hover { background: #fef9c3; border-color: #fbbf24; }
.btn-task-comment--done {
  font-size: 12px;
  padding: 2px 8px;
  background: #fefce8;
  border-color: #fde68a;
  color: #92400e;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-task-comment--done:hover { background: #fef9c3; border-color: #fbbf24; }
.task-comment-preview { font-style: italic; font-size: 11px; }
.db-inline-edit {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.db-edit-textarea {
  width: 100%; min-height: 70px;
  padding: 7px 10px; border: 1.5px solid #6366f1;
  border-radius: 6px; font-size: 13px; line-height: 1.5;
  resize: vertical; font-family: inherit;
}
.db-edit-actions { display: flex; gap: 8px; }
.db-edit-save {
  padding: 4px 14px; background: #4338ca; color: #fff;
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.db-edit-save:hover { background: #3730a3; }
.db-edit-cancel {
  padding: 4px 12px; background: none; color: #64748b;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.db-edit-cancel:hover { background: #f1f5f9; }

.db-wa {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
}
.db-empty {
  font-size: 13px;
  color: #86efac;
  font-style: italic;
  padding: 4px 0;
}
.db-done-count {
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  margin-top: 6px;
  text-decoration: underline;
}
.db-more {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  margin-top: 6px;
}
.db-block-action .btn-action-done {
  flex-shrink: 0;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  cursor: pointer;
  color: #15803d;
}

/* ── Badge actions en attente ────────────────────────────────────────────── */
.actions-pending-badge {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.actions-pending-badge.hidden { display: none; }
.next-reunion-badge {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.next-reunion-badge:hover { background: #fee2e2; }
.next-reunion-badge.hidden { display: none; }

/* ── Bouton ✓ Fait dans le journal ───────────────────────────────────────── */
.btn-action-done {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
  margin-left: auto;
}
.btn-action-done:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-action-done.done {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-alert-resolve {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid #fca5a5;
  border-radius: 20px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-alert-resolve:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-alert-resolve.resolved {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.entry-done .entry-text {
  text-decoration: line-through;
  opacity: .6;
}

/* ── Modal Fiches de mission ─────────────────────────────────────────────── */
.modal-box-fiches {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.fiches-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 10px 24px 0;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.fiche-tab {
  padding: 7px 12px;
  border: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.fiche-tab:hover { background: #e2e8f0; }
.fiche-tab.active {
  background: white;
  color: #0f172a;
  font-weight: 800;
  border-bottom: 2px solid #0284c7;
}
.fiches-body {
  overflow-y: auto;
  padding: 16px 20px;
}
.fiches-global-progress {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.fiches-global-label {
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 8px;
}
.fiches-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 500px) { .fiches-overview-grid { grid-template-columns: 1fr; } }
.fiche-overview-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background .15s;
}
.fiche-overview-card:hover { background: #f1f5f9; }
.fiche-overview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fiche-overview-emoji { font-size: 18px; flex-shrink: 0; }
.fiche-overview-service { font-size: 12px; font-weight: 700; color: #1e293b; flex: 1; }
.fiche-overview-pct { font-size: 12px; font-weight: 800; white-space: nowrap; }
.fiche-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.fiche-progress-bar-global { height: 10px; border-radius: 5px; }
.fiche-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}
.fiche-service-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.fiche-service-title { font-size: 16px; font-weight: 800; color: #1e293b; }
.fiche-service-progress { font-size: 12px; color: #64748b; margin-top: 2px; }
.fiche-items-list { display: flex; flex-direction: column; gap: 4px; }
.fiche-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: background .12s;
}
.fiche-item:hover { background: #f1f5f9; }
.fiche-item-done {
  background: #f0fdf4;
  opacity: .75;
}
.fiche-item-done .fiche-item-text { text-decoration: line-through; color: #4ade80; }
.fiche-item-check {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #94a3b8;
  font-weight: 700;
}
.fiche-item-done .fiche-item-check { color: #22c55e; }
.fiche-item-text { font-size: 13px; color: #374151; line-height: 1.5; }

/* ── Modal Communication ─────────────────────────────────────────────────── */
.commun-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 10px 24px 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow-x: auto;
}
.commun-tab {
  padding: 7px 14px;
  border: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.commun-tab:hover { background: #e2e8f0; }
.commun-tab.active {
  background: white;
  color: #0f172a;
  font-weight: 800;
  border-bottom: 2px solid #0284c7;
}
.commun-body {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.commun-template-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.commun-template-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.commun-template-emoji { font-size: 20px; }
.commun-template-label { font-size: 13px; font-weight: 800; color: #1e293b; flex: 1; }
.btn-copy-template {
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-copy-template:hover { background: #bfdbfe; }
.commun-template-subject {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  padding: 8px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e2e8f0;
}
.commun-template-body {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #334155;
  background: white;
  margin: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
  line-height: 1.6;
  max-height: 260px;
  overflow-y: auto;
}

/* ── Modal Compte-rendu réunion ──────────────────────────────────────────── */
.meeting-report { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.meeting-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.meeting-badge {
  background: #1e293b;
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
}
.meeting-timestamp { font-size: 12px; color: #64748b; }
.meeting-window-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.meeting-situation { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 12px 14px; }
.meeting-situation p { margin: 6px 0 0; font-size: 13px; color: #0c4a6e; line-height: 1.6; }
.meeting-exchanges { background: #faf5ff; border: 1px solid #e9d5ff; }
.meeting-synthese-globale { background: #f0fdf4; border: 1px solid #bbf7d0; }
.meeting-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 14px;
}
.meeting-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.meeting-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.meeting-section-list li {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}
.meeting-section-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #94a3b8;
}

/* Décisions et actions en cours — mise en valeur */
#ms-decisions { background: #f0fdf4; border: 1.5px solid #86efac; }
#ms-decisions .meeting-section-title { color: #166534; }
#ms-decisions .meeting-section-list li { font-weight: 600; color: #15803d; }
#ms-actions_en_cours { background: #fff7ed; border: 1.5px solid #fed7aa; }
#ms-actions_en_cours .meeting-section-title { color: #9a3412; }
#ms-actions_en_cours .meeting-section-list li { color: #c2410c; }

/* Édition CR */
.meeting-edit-hint {
  font-size: 11px; color: #64748b; background: #f1f5f9;
  border: 1px dashed #cbd5e1; border-radius: 6px;
  padding: 6px 10px; text-align: center;
}
.meeting-lock-banner {
  font-size: 12px; color: #92400e; background: #fef3c7;
  border: 1px solid #fcd34d; border-radius: 6px;
  padding: 8px 12px; display: flex; align-items: center; gap: 6px;
}
.meeting-edit-block {
  font-size: 13px; color: #1e293b; line-height: 1.6;
  min-height: 48px; padding: 6px 8px; border-radius: 6px;
  border: 1px dashed transparent; outline: none;
  transition: border-color .15s;
}
.meeting-edit-block:focus { border-color: #93c5fd; background: #eff6ff; }
.meeting-edit-item:focus { background: #eff6ff; border-radius: 3px; outline: none; }
.meeting-edit-item[contenteditable="true"] { cursor: text; padding: 2px 4px; margin-left: -4px; border-radius: 4px; }
.meeting-edit-item[contenteditable="true"]:hover { background: #f1f5f9; }
.btn-add-meeting-item {
  margin-top: 6px; font-size: 11px; color: #2563eb; background: none;
  border: 1px dashed #93c5fd; border-radius: 5px; padding: 3px 10px;
  cursor: pointer; font-weight: 600;
}
.btn-add-meeting-item:hover { background: #eff6ff; }
.btn-save-meeting {
  background: #1e40af; color: white; border: none; border-radius: 8px;
  padding: 9px 20px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-save-meeting:hover { background: #1d4ed8; }

/* Heure en début de ligne + séparateur de jour */
.meeting-item-time {
  display: inline-block;
  min-width: 38px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 7px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
#ms-decisions .meeting-item-time   { background: #bbf7d0; color: #166534; }
#ms-actions_en_cours .meeting-item-time { background: #fed7aa; color: #9a3412; }
.meeting-section-list li { display: flex; align-items: baseline; }
.meeting-section-list li::before { display: none; }
.meeting-item-text { flex: 1; }
.meeting-day-sep {
  display: block !important;
  font-size: 10px; font-weight: 800; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 0 2px; border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
}
.meeting-day-sep:first-child { border-top: none; margin-top: 0; padding-top: 0; }

/* ── Pilotage : bouton supprimer ─────────────────────────────────────────── */
.db-del-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fca5a5;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.db-row:hover .db-del-btn { opacity: 1; }

/* ── Journal : bouton supprimer ──────────────────────────────────────────── */
.btn-delete-entry {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fca5a5;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.entry:hover .btn-delete-entry { opacity: 1; }

/* ── Assignation : badges et boutons ─────────────────────────────────────── */
.db-assign-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.db-row:hover .db-assign-btn { opacity: 1; }
.db-unassign-btn { opacity: 1 !important; border-color: #fca5a5; background: #fff5f5; color: #dc2626; }

.db-assign-badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
}
.db-assign-badge--pending { background: #fff7ed; border-color: #fb923c; color: #c2410c; }
.db-assign-badge--done    { background: #f0fdf4; border-color: #4ade80; color: #15803d; }
.db-count-done { font-size: 11px; color: #15803d; font-weight: 600; }

.db-type-badge-sm { font-size: 10px; padding: 1px 6px; flex-shrink: 0; }

/* Journal assign badge */
.btn-assign-entry {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.entry:hover .btn-assign-entry { opacity: 1; }

.entry-assign-badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid;
  cursor: default;
}
.entry-assign-badge--pending { background: #fff7ed; border-color: #fb923c; color: #c2410c; }
.entry-assign-badge--done    { background: #f0fdf4; border-color: #4ade80; color: #15803d; }

/* ── Pilotage : sections repliables ──────────────────────────────────────── */
.db-collapse-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px dashed rgba(0,0,0,.1);
  margin-top: 6px;
  padding: 6px 0 2px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  font-weight: 600;
}
.db-collapse-toggle:hover { color: #1e293b; }
.db-collapse-content { padding-top: 4px; }

/* ── Pilotage : bloc tâches assignées ────────────────────────────────────── */
.db-block-assigned { background: #fefce8; border-color: #fde68a; }
.db-block-reunion  { background: #eff6ff; border-color: #93c5fd; }
.db-block-reunion .db-block-title { color: #1d4ed8; }
.db-reunion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}
.db-reunion-date  { font-size: 12px; font-weight: 700; color: #1d4ed8; white-space: nowrap; flex-shrink: 0; }
.db-reunion-title { font-size: 13px; color: #1e293b; flex: 1; }
.db-reunion-join  {
  font-size: 12px; font-weight: 700; padding: 3px 12px;
  border-radius: 6px; background: #2563eb; color: #fff;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.db-reunion-join:hover { background: #1d4ed8; }
.db-block-assigned .db-block-title { color: #92400e; }

/* ── Pilotage : barre filtre membre ──────────────────────────────────────── */
.db-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 4px;
}
.db-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.db-filter-chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  cursor: pointer;
  font-weight: 600;
  transition: background .1s, border-color .1s;
}
.db-filter-chip:hover { background: #f1f5f9; }
.db-filter-chip--active { background: #4338ca; border-color: #4338ca; color: white; }
.db-filter-chip--unassigned { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.db-filter-chip--unassigned:hover { background: #fef3c7; }
.db-filter-chip--unassigned.db-filter-chip--active { background: #d97706; border-color: #d97706; color: white; }
.db-filter-chip--aliases { border-color: #cbd5e1; color: #64748b; background: #f8fafc; margin-left: 6px; }
.db-filter-chip--aliases:hover { background: #f1f5f9; color: #334155; }
/* ── Modal aliases ── */
.alias-row { display:flex; align-items:center; gap:8px; padding:4px 8px; background:#f8fafc; border-radius:6px; border:1px solid #e2e8f0; }
.alias-from { font-family:monospace; font-size:13px; font-weight:600; color:#1e40af; background:#dbeafe; padding:2px 6px; border-radius:4px; }
.alias-arrow { color:#94a3b8; font-size:14px; }
.alias-to { font-family:monospace; font-size:13px; font-weight:600; color:#166534; background:#dcfce7; padding:2px 6px; border-radius:4px; flex:1; }
.alias-del-btn { margin-left:auto; background:none; border:none; color:#ef4444; cursor:pointer; font-size:14px; padding:2px 4px; border-radius:4px; }
.alias-del-btn:hover { background:#fee2e2; }

/* ── Modal assignation ────────────────────────────────────────────────────── */
.assign-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.assign-modal-box {
  background: white;
  border-radius: 14px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.assign-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: #4338ca;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.assign-modal-close {
  background: none; border: none; color: white; cursor: pointer;
  font-size: 16px; padding: 0 4px; border-radius: 4px;
}
.assign-modal-close:hover { background: rgba(255,255,255,.2); }
.assign-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.assign-modal-entry-text {
  font-size: 12px; color: #64748b;
  background: #f8fafc; border-radius: 6px;
  padding: 8px 10px; margin: 0 0 12px;
  border: 1px solid #e2e8f0;
  font-style: italic;
}
.assign-current { margin-bottom: 8px; }
.assign-member-list {
  display: flex; flex-direction: column; gap: 8px;
}
.assign-member-btn {
  text-align: left;
  padding: 10px 14px;
  border: 1.5px solid #c4b5fd;
  border-radius: 8px;
  background: #f5f3ff;
  color: #3730a3;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .1s;
  line-height: 1.4;
}
.assign-member-btn small { color: #6d28d9; font-weight: 400; font-size: 11px; }
.assign-member-btn:hover { background: #ede9fe; }
.assign-member-btn--current { border-color: #818cf8; background: #e0e7ff; }

/* ── Bannière tâches membre ───────────────────────────────────────────────── */
.member-tasks-banner, #member-tasks-banner {
  background: #fffbeb;
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.member-banner-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 800;
  color: #92400e; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .05em;
}
.member-banner-count {
  background: #f59e0b; color: white;
  border-radius: 20px; padding: 1px 8px; font-size: 11px;
}
.member-banner-count--ok { background: #16a34a; }
.member-task-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #fde68a;
  font-size: 13px;
}
.member-task-row:last-child { border-bottom: none; }
.member-task-done { opacity: .6; }
.member-task-text { flex: 1; color: #1e293b; }
.member-task-done-label { font-size: 11px; color: #16a34a; font-weight: 700; flex-shrink: 0; }
.btn-member-done {
  flex-shrink: 0;
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  background: #16a34a;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-member-done:hover { background: #15803d; }

/* ── Badge "modifié" ─────────────────────────────────────────────────────── */
.db-edited-badge, .entry-edited-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ── Info : bouton "Pris en compte" ──────────────────────────────────────── */
.db-ack-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #15803d;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  font-weight: 700;
}
.db-row:hover .db-ack-btn { opacity: 1; }
.db-row-done .db-ack-btn  { opacity: 1; }

/* ── Bouton Corbeille toolbar ─────────────────────────────────────────────── */
.btn-trash-toggle {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #fca5a5;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  font-weight: 600;
}
.btn-trash-toggle:hover { background: #fee2e2; }

/* ── Modal Corbeille : lignes ─────────────────────────────────────────────── */
.trash-row {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
}
.trash-row:last-child { border-bottom: none; }
.trash-row-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 5px;
}
.trash-time { font-size: 11px; color: #94a3b8; font-weight: 700; }
.trash-deleted-by { font-size: 11px; color: #dc2626; font-weight: 600; }
.trash-text {
  font-size: 12px; color: #374151;
  margin: 0 0 8px; line-height: 1.5;
}
.btn-trash-restore {
  font-size: 11px; padding: 3px 10px;
  border: 1px solid #86efac; border-radius: 5px;
  background: #f0fdf4; color: #15803d;
  cursor: pointer; font-weight: 700;
}
.btn-trash-restore:hover { background: #dcfce7; }

/* ── Pilotage : barre de recherche ───────────────────────────────────────── */
.db-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1.5px solid #c7d2fe;
  border-radius: 10px;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(99,102,241,.08);
}
.db-search-icon { font-size: 14px; flex-shrink: 0; }
.db-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #1e293b;
  background: transparent;
  font-family: inherit;
}
.db-search-input::placeholder { color: #94a3b8; }
.db-search-clear {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
  border-radius: 4px;
}
.db-search-clear:hover { background: #f1f5f9; color: #475569; }
.db-search-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* ── Pilotage : badge auteur ──────────────────────────────────────────────── */
.db-author-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* ── Pilotage : séparateur de jour ───────────────────────────────────────── */
.db-day-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.db-day-sep::before,
.db-day-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.db-day-sep-label {
  white-space: nowrap;
  padding: 0 4px;
}

/* ── Bouton Fusionner ─────────────────────────────────────────────────────── */
.btn-merge-entry {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-merge-entry:hover {
  background: #e0e7ff;
  border-color: #6366f1;
}

/* ── Codes uniques par entrée (A1, I3, AL2, D1…) ────────────────────────── */
.entry-code-badge,
.db-code-badge {
  flex-shrink: 0;
  font-family: monospace;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid transparent;
}
/* Journal */
.entry-code-badge { display: inline-block; margin-right: 4px; vertical-align: middle; }
/* Pilotage */
.db-code-badge { display: inline-flex; align-items: center; }

/* Couleurs par type */
.entry-code-A, .db-code-A { background: #dcfce7; color: #166534; border-color: #86efac; }
.entry-code-I, .db-code-I { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.entry-code-AL,.db-code-AL { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.entry-code-D, .db-code-D { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.entry-code-R, .db-code-R { background: #f0fdf4; color: #15803d; border-color: #86efac; }

/* ── Bouton Fusionner — icône seule ─────────────────────────────────────── */
.btn-merge-entry {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-merge-entry:hover { background: #e0e7ff; border-color: #6366f1; }

/* Source sélectionnée (entrée en mode attente de cible) */
.btn-merge-source {
  background: #fef9c3 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}
/* Cibles disponibles (toutes les autres) */
.btn-merge-target {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  animation: pulse-merge 1s ease-in-out infinite;
}
@keyframes pulse-merge {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* ── Bannière mode fusion ────────────────────────────────────────────────── */
.db-merge-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fef9c3;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #78350f;
  margin-bottom: 10px;
  font-weight: 600;
}
.db-merge-cancel {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid #f59e0b;
  background: #fff;
  color: #92400e;
  cursor: pointer;
  font-weight: 700;
}
.db-merge-cancel:hover { background: #fef3c7; }

/* ── Pilotage : boutons hover-only (⊔ fusion + ✂️ ciseau) ───────────────── */
.db-row .btn-merge-entry,
.db-row .db-hover-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.db-row:hover .btn-merge-entry,
.db-row:hover .db-hover-btn {
  opacity: 1;
  pointer-events: auto;
}
/* Toujours visible en mode fusion (source + checkboxes) */
.db-row .btn-merge-source,
.db-row .merge-checkbox-label {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Ciseau dans le pilotage — même gabarit que ⊔ ────────────────────────── */
.db-row .btn-split-entry.db-hover-btn {
  font-size: 13px;
  width: 28px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-row .btn-split-entry.db-hover-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
}

/* ── Checkboxes de sélection en mode fusion ───────────────────────────────── */
.merge-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.merge-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #6366f1;
}

/* ── Bouton Fusionner dans la bannière ────────────────────────────────────── */
.db-merge-confirm {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 6px;
  border: 1px solid #6366f1;
  background: #6366f1;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.db-merge-confirm:hover { background: #4f46e5; }
.db-merge-hint {
  font-size: 12px;
  color: #92400e;
  font-style: italic;
}

/* ── Ligne source de fusion : surbrillance ────────────────────────────────── */
.db-row:has(.btn-merge-source) {
  background: #fef9c3 !important;
  border-left: 3px solid #f59e0b;
}

/* ── Journal : ✂️ et ⊔ hover-only ────────────────────────────────────────── */
.entry .entry-hover-btn,
.entry .btn-merge-entry {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  font-size: 13px;
  width: 26px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}
.entry:hover .entry-hover-btn,
.entry:hover .btn-merge-entry {
  opacity: 1;
  pointer-events: auto;
}
.entry .entry-dup-btn { color: #6366f1; }
.entry .entry-dup-btn:hover { background: #ede9fe; border-color: #a5b4fc; }

/* Toujours visible en mode fusion */
.entry .btn-merge-source,
.entry .merge-checkbox-label {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.entry .entry-hover-btn:hover { background: #f1f5f9; border-color: #94a3b8; }

/* ── Journal d'activité ───────────────────────────────────────────────── */
.activity-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1200; display: flex; align-items: flex-start;
  justify-content: center; padding: 24px 16px; overflow-y: auto;
}
.activity-panel {
  background: #0f172a; border: 1px solid #1e293b; border-radius: 12px;
  width: 100%; max-width: 960px; padding: 24px; color: #f1f5f9;
  margin: auto 0;
}
.act-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.act-tab {
  padding: 6px 18px; border-radius: 20px; border: 1px solid #334155;
  background: transparent; color: #94a3b8; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .15s;
}
.act-tab.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.act-log-list {
  max-height: 58vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
}
.act-row {
  display: grid; grid-template-columns: 130px 130px 1fr 100px;
  gap: 8px; padding: 6px 10px; border-radius: 6px;
  background: #1e293b; font-size: 12px; align-items: center;
}
.act-row:nth-child(even) { background: #172033; }
.act-who { font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap;
}
.act-badge-AJOUT       { background: #1d4ed8; color: #fff; }
.act-badge-VALIDATION  { background: #059669; color: #fff; }
.act-badge-RÉSOLUTION  { background: #be123c; color: #fff; }
.act-badge-ASSIGNATION { background: #7c3aed; color: #fff; }
.act-badge-MODIFICATION{ background: #d97706; color: #fff; }
.act-badge-COMMENTAIRE { background: #0891b2; color: #fff; }
.act-badge-CONNEXION   { background: #334155; color: #94a3b8; }
.act-badge-DUPLICATION { background: #475569; color: #cbd5e1; }
.act-badge-SUPPRESSION { background: #7f1d1d; color: #fca5a5; }
.act-detail { color: #94a3b8; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-time   { color: #475569; font-size: 11px; text-align: right; white-space: nowrap; }
/* Synthèse */
.synth-grid { display: flex; flex-direction: column; gap: 10px; max-height: 65vh; overflow-y: auto; }
.synth-card {
  background: #1e293b; border-radius: 8px; padding: 12px 16px;
  display: grid; grid-template-columns: 180px 1fr 60px; gap: 12px; align-items: center;
}
.synth-name { font-weight: 700; font-size: 14px; color: #f1f5f9; }
.synth-last { font-size: 11px; color: #64748b; margin-top: 2px; }
.synth-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.synth-stat { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.synth-score { font-size: 22px; font-weight: 900; color: #fbbf24; text-align: right; }
.synth-score-lbl { font-size: 10px; color: #64748b; text-align: right; margin-top: -2px; }
.synth-bar-wrap { height: 5px; background: #0f172a; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.synth-bar { height: 100%; background: linear-gradient(90deg, #1d4ed8, #3b82f6); border-radius: 3px; }
.btn-activity-log {
  background: #1e293b; color: #94a3b8; border: 1px solid #334155;
  border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-activity-log:hover { background: #334155; color: #f1f5f9; }

/* ── Base documentaire ────────────────────────────────────────────────── */
.btn-document-launcher { background: #fff; color: #374151; }
.btn-docbase {
  background: #1e293b; color: #94a3b8; border: 1px solid #334155;
  border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; width: 100%; text-align: left; margin-top: 4px;
  transition: all .15s;
}
.btn-docbase:hover { background: #334155; color: #f1f5f9; }
.doc-drop-zone {
  border: 2px dashed #334155; border-radius: 10px; padding: 32px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s;
}
.doc-drop-zone:hover { border-color: #60a5fa; }
.doc-card {
  background: #1e293b; border-radius: 10px; padding: 14px 16px;
  border: 1px solid #334155;
}
.doc-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-name { font-size: 14px; font-weight: 700; color: #f1f5f9; margin-bottom: 4px; }
.doc-meta { font-size: 11px; color: #64748b; }
.doc-cat-ref    { background: #1d4ed8; color: #fff; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.doc-cat-crisis { background: #374151; color: #9ca3af; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.doc-valid-badge   { background: #064e3b; color: #6ee7b7; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.doc-pending-badge { background: #422006; color: #fb923c; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.doc-update-pending {
  margin: 8px 0; background: #422006; border-radius: 8px; padding: 8px 12px;
  color: #fb923c; font-size: 12px; border: 1px solid #92400e;
}
.doc-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.doc-btn-dl       { padding: 5px 12px; border-radius: 6px; border: 1px solid #334155; background: #0f172a; color: #94a3b8; cursor: pointer; font-size: 12px; }
.doc-btn-validate { padding: 5px 12px; border-radius: 6px; border: none; background: #065f46; color: #6ee7b7; cursor: pointer; font-size: 12px; font-weight: 700; }
.doc-btn-approve  { padding: 4px 10px; border-radius: 6px; border: none; background: #065f46; color: #6ee7b7; cursor: pointer; font-size: 11px; font-weight: 700; margin-top: 6px; }
.doc-btn-update   { padding: 5px 12px; border-radius: 6px; border: 1px solid #334155; background: #1e293b; color: #60a5fa; cursor: pointer; font-size: 12px; }
.doc-btn-delete   { padding: 5px 12px; border-radius: 6px; border: 1px solid #7f1d1d; background: #1a0505; color: #f87171; cursor: pointer; font-size: 12px; }
.entry-DOCUMENT .entry-badge { background: #1e3a5f; color: #60a5fa; }
