/* ── 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;
}
.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 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.crisis-header {
  background: #1e293b;
  color: white;
  padding: 14px 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;
  height: calc(100vh - 58px);
}
.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-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; }

#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;
}

.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-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; }

#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: #cbd5e1;
  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;
}
.entry-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.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-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; }
.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; }
.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; }
#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;
}

/* ── 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 { display: none !important; }
body.membre-mode .panel-right { flex: 1 !important; max-width: 100% !important; }
body.membre-mode .btn-reopen-crisis { display: none !important; }
body.membre-mode .btn-new-crisis { display: none !important; }
body.membre-mode .btn-discard { 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; }
}
