/* ================================================================
   UrgencePro — Styles modules avancés
   ================================================================ */

/* ── NOTIFICATIONS DRAWER ── */
.notif-trigger {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.notif-trigger:hover { color: var(--text-primary); border-color: var(--border-strong); }

#notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--p1);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.notif-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}
.notif-drawer.open { right: 0; }

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.notif-drawer-header h3 { font-size: 14px; font-weight: 500; }
.notif-clear {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.notif-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

#notif-panel {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}
.notif-item:hover { border-color: var(--border-strong); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item.warning { border-left: 3px solid var(--p2); }
.notif-item.error { border-left: 3px solid var(--accent-red); }
.notif-item.success { border-left: 3px solid var(--accent-green); }

.notif-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 13px; color: var(--text-primary); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-close { color: var(--text-muted); font-size: 16px; cursor: pointer; }
.notif-close:hover { color: var(--text-primary); }
.notif-empty { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: 13px; }

/* ── LIVE BANNER ── */
.live-banner {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  z-index: 9998;
  max-width: 380px;
  animation: slide-in 0.3s ease;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.live-banner.warning { border-left: 3px solid var(--p2); background: var(--p2-bg); color: var(--p2); }
.live-banner.error { border-left: 3px solid var(--accent-red); background: var(--p1-bg); color: var(--accent-red); }
.live-banner.success { border-left: 3px solid var(--accent-green); background: rgba(63,185,80,0.1); color: var(--accent-green); }
.live-banner button { background: none; border: none; cursor: pointer; font-size: 18px; color: currentColor; opacity: 0.7; padding: 0; line-height: 1; }
.live-banner button:hover { opacity: 1; }

@keyframes slide-in { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── XP POPUP ── */
.xp-popup {
  position: fixed;
  bottom: 80px;
  right: 24px;
  padding: 8px 16px;
  background: rgba(63,185,80,0.15);
  border: 1px solid rgba(63,185,80,0.4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
}
.xp-popup.animate { opacity: 1; transform: translateY(-20px); }

/* ── BADGE UNLOCK ── */
.badge-unlock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 280px;
}
.badge-unlock.show { transform: translateX(-50%) translateY(0); }
.badge-unlock-icon { font-size: 40px; animation: badge-bounce 0.5s ease; }
@keyframes badge-bounce { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.badge-unlock-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.badge-unlock-name { font-size: 16px; font-weight: 600; margin: 2px 0; }
.badge-unlock-xp { font-size: 13px; color: var(--accent-green); font-weight: 500; }

/* ── GAMIFICATION PROFILE ── */
.gami-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.gami-level { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.gami-xp { font-size: 13px; color: var(--text-secondary); margin: 4px 0; }
.gami-bar-wrap { height: 6px; background: var(--bg-hover); border-radius: 3px; margin: 10px 0; }
.gami-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.gami-next { font-size: 12px; color: var(--text-muted); }
.gami-badges-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gami-badge-mini { font-size: 20px; cursor: help; }

/* ── BADGES GRID ── */
.badges-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}
.badge-card.unlocked { border-color: rgba(63,185,80,0.3); background: rgba(63,185,80,0.05); }
.badge-card.locked { opacity: 0.5; filter: grayscale(1); }
.badge-icon { font-size: 32px; margin-bottom: 8px; }
.badge-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.badge-desc { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; }
.badge-xp { font-size: 12px; font-weight: 600; color: var(--accent-green); }

/* ── QUIZ MODULE ── */
.quiz-module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 700px;
}
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.quiz-progress { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.quiz-score-live { font-size: 13px; color: var(--text-secondary); }
.quiz-title { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.quiz-context {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 14px;
  line-height: 1.5;
}
.quiz-instruction { font-size: 13px; font-weight: 500; margin-bottom: 12px; color: var(--text-secondary); }
.quiz-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.quiz-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.quiz-item:hover { border-color: var(--border-strong); }
.quiz-item.selected { border-color: var(--accent); background: rgba(88,166,255,0.06); }
.quiz-item.error { border-color: var(--accent-red) !important; background: var(--p1-bg) !important; }
.quiz-item.missed { border-color: var(--p2) !important; background: var(--p2-bg) !important; }
.quiz-item.correct { border-color: var(--accent-green) !important; background: rgba(63,185,80,0.06) !important; }
.quiz-item.false-positive { border-color: var(--p2) !important; background: var(--p2-bg) !important; }

.qi-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: var(--transition);
}
.qi-checkbox.selected { background: var(--accent); border-color: var(--accent); position: relative; }
.qi-checkbox.selected::after { content: '✕'; position: absolute; top: -1px; left: 2px; font-size: 12px; color: white; font-weight: 700; }

.qi-text { font-size: 13px; flex: 1; line-height: 1.4; }
.qi-explanation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
}
.qi-explanation.error-exp { color: var(--accent-red); }
.qi-explanation.ok-exp { color: var(--accent-green); }

.quiz-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.quiz-feedback { padding: 12px 14px; border-radius: var(--radius); margin-top: 12px; font-size: 13px; }
.fb-success { color: var(--accent-green); }
.fb-error { color: var(--accent-red); }

.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result-icon { font-size: 56px; margin-bottom: 12px; }
.quiz-result h3 { font-size: 18px; margin-bottom: 16px; }
.quiz-result-score { font-family: 'Space Grotesk', sans-serif; font-size: 48px; font-weight: 700; color: var(--accent); }
.quiz-result-pct { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.quiz-result-xp { font-size: 14px; color: var(--accent-green); font-weight: 600; margin-bottom: 16px; }
.quiz-result p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

/* ── SCORES MODULES ── */
.score-module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.score-module-header { margin-bottom: 20px; }
.score-module-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.score-icon { font-size: 28px; }
.score-module-title h3 { font-size: 16px; font-weight: 500; }
.score-module-title span { font-size: 12px; color: var(--text-muted); }
.score-live-result {
  margin-left: auto;
  text-align: center;
  background: var(--bg-secondary);
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.score-big { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; transition: color 0.3s; }
.score-big-label { font-size: 12px; color: var(--text-secondary); }

.score-interpretation {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 3px solid var(--border-strong);
}

/* NIHSS */
.nihss-items { display: flex; flex-direction: column; gap: 4px; max-height: 500px; overflow-y: auto; }
.nihss-item { padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); transition: var(--transition); }
.nihss-item:hover { background: var(--bg-hover); }
.nihss-item-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.nihss-options { display: flex; flex-wrap: wrap; gap: 6px; }
.nihss-opt { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: var(--transition); }
.nihss-opt:hover { background: var(--bg-hover); }
.nihss-opt input { display: none; }
.nihss-opt-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  transition: var(--transition);
}
.nihss-opt input:checked ~ .nihss-opt-badge { background: var(--accent); border-color: var(--accent); color: white; }
.nihss-opt-label { font-size: 12px; color: var(--text-secondary); }
.nihss-opt input:checked ~ * { color: var(--text-primary); }

/* HEART */
.heart-grid { display: flex; flex-direction: column; gap: 8px; }
.heart-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}
.heart-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(229,62,62,0.1);
  color: var(--accent-red);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.heart-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.heart-options { display: flex; flex-wrap: wrap; gap: 6px; }
.heart-opt { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--text-secondary); }
.heart-opt input { accent-color: var(--accent-red); }
.heart-opt input:checked + span { color: var(--text-primary); font-weight: 500; }

/* NEWS2 */
.news2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.news2-result-area {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.news2-score-big { font-family: 'Space Grotesk', sans-serif; font-size: 48px; font-weight: 700; min-width: 80px; text-align: center; transition: color 0.3s; }
.news2-level { font-size: 16px; font-weight: 500; }
.news2-action { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.news2-bar-container { height: 6px; background: var(--bg-hover); border-radius: 3px; margin-top: 10px; }
#news2-bar { height: 100%; border-radius: 3px; transition: all 0.5s ease; width: 0%; }

/* ── TRANSMISSIONS ── */
.transmission-module { max-width: 700px; }
.trans-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.trans-header h3 { font-size: 16px; font-weight: 500; }
.trans-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.trans-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.trans-item:hover { border-color: var(--border-strong); }
.trans-item.unread { border-left: 3px solid var(--accent); }
.trans-item.warning { border-left: 3px solid var(--p2); }
.trans-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
}
.trans-from { font-weight: 600; color: var(--text-primary); }
.trans-arrow { color: var(--text-muted); }
.trans-to { color: var(--accent); }
.trans-patient { color: var(--text-secondary); }
.trans-time { margin-left: auto; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
.trans-new { background: var(--accent); color: #0d1117; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.trans-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.new-trans-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.new-trans-form h4 { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.trans-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ── PANCARTE VENTILATION ── */
.panc-ventilation-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.panc-ventilation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.panc-vent-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.panc-vent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.panc-vent-icon {
  font-size: 16px;
}

.panc-vent-params {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── PANCARTE EXAMENS ── */
.panc-examens-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.panc-examens-legend {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.panc-examen-leg {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.panc-examen-leg.demande { color: var(--text-primary); background: rgba(88,101,242,0.1); }
.panc-examen-leg.prescrit { color: var(--text-primary); background: rgba(88,101,242,0.1); }
.panc-examen-leg.branche { color: #f59e0b; background: rgba(245,158,11,0.1); }
.panc-examen-leg.pret-brancardage,
.panc-examen-leg.brancardage-aller,
.panc-examen-leg.retour-demande { color: #0284c7; background: rgba(14,165,233,0.12); }
.panc-examen-leg.encours { color: var(--accent); background: rgba(16,185,129,0.1); }
.panc-examen-leg.preleve,
.panc-examen-leg.realise,
.panc-examen-leg.retour-effectue { color: var(--accent-green); background: rgba(63,185,80,0.1); }
.panc-examen-leg.termine { color: var(--accent-green); background: rgba(63,185,80,0.1); }
.panc-examen-leg.bloque { color: #b45309; background: rgba(245,158,11,0.14); }
.panc-examen-leg.annule { color: var(--p2); background: rgba(239,68,68,0.1); }

.panc-examens-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.panc-examen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.panc-examen-row:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.panc-examen-info {
  flex: 1;
}

.panc-examen-nom {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.panc-examen-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.panc-examen-comment {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-style: italic;
}

.panc-examen-freq-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

.panc-examen-freq-badge:contains('🕐') {
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
}

.panc-examen-freq-badge:contains('🚨') {
  color: var(--p2);
  background: rgba(239,68,68,0.1);
}

.panc-examen-statut {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  min-width: 120px;
  justify-content: center;
}

.panc-examen-statut.demande { color: var(--text-primary); background: rgba(88,101,242,0.1); }
.panc-examen-statut.prescrit { color: var(--text-primary); background: rgba(88,101,242,0.1); }
.panc-examen-statut.branche { color: #f59e0b; background: rgba(245,158,11,0.1); }
.panc-examen-statut.pret-brancardage,
.panc-examen-statut.brancardage-aller,
.panc-examen-statut.retour-demande { color: #0284c7; background: rgba(14,165,233,0.12); }
.panc-examen-statut.encours { color: var(--accent); background: rgba(16,185,129,0.1); }
.panc-examen-statut.preleve,
.panc-examen-statut.realise,
.panc-examen-statut.retour-effectue { color: var(--accent-green); background: rgba(63,185,80,0.1); }
.panc-examen-statut.termine { color: var(--accent-green); background: rgba(63,185,80,0.1); }
.panc-examen-statut.bloque { color: #b45309; background: rgba(245,158,11,0.14); }
.panc-examen-statut.annule { color: var(--p2); background: rgba(239,68,68,0.1); }

.panc-comment-textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  resize: vertical;
}

/* ── VENTILATION TABS ── */
.ventilation-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.vent-subtab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
}

.vent-subtab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.vent-subtab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-hover);
}

.vent-subtab.active:hover {
  background: var(--bg-active);
}

/* ── FHIR PREVIEW ── */
.fhir-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 700px;
}
.fhir-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fhir-badge-large {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--p5-bg);
  color: var(--p5);
  border: 1px solid rgba(49,130,206,0.3);
}
.fhir-stats { display: flex; gap: 16px; margin-bottom: 16px; }
.fhir-stat { text-align: center; }
.fhir-stat span { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; color: var(--accent); }
.fhir-stat { font-size: 11px; color: var(--text-muted); }
.fhir-resources { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fhir-resource {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.fhir-resource-type { font-weight: 600; color: var(--accent); }
.fhir-resource-id { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.fhir-code {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #a5d6ff;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre;
}

/* ── LIVE MONITORING PANEL ── */
.monitoring-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.monitoring-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.monitoring-header h4 { font-size: 14px; font-weight: 500; }
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-green);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
.monitoring-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.monitoring-vital {
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 8px;
}
.mv-name { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px; }
.mv-big { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 600; transition: color 0.5s; }
.mv-unit-sm { font-size: 10px; color: var(--text-muted); }
.mv-sparkline { width: 100%; height: 40px; margin-top: 6px; display: block; }

/* ── ADVANCED TABS NAVIGATION ── */
.advanced-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 6px;
}
.adv-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: none;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.adv-tab:hover { color: var(--text-primary); }
.adv-tab.active { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }

/* ── KEYBOARD SHORTCUT OVERLAY ── */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.shortcuts-overlay.show { display: flex; }
.shortcuts-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
}
.shortcuts-card h3 { margin-bottom: 20px; font-size: 16px; }
.shortcut-list { display: flex; flex-direction: column; gap: 8px; }
.shortcut-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-secondary); }
.shortcut-key { font-family: 'JetBrains Mono', monospace; background: var(--bg-secondary); border: 1px solid var(--border-strong); border-radius: 5px; padding: 3px 8px; font-size: 12px; color: var(--text-primary); }

/* ── RESPONSIVE EXTRAS ── */
@media (max-width: 768px) {
  .nihss-options { flex-direction: column; }
  .heart-row { flex-direction: column; }
  .news2-grid { grid-template-columns: 1fr 1fr; }
  .monitoring-grid { grid-template-columns: repeat(3, 1fr); }
  .monitoring-grid .monitoring-vital:nth-child(4),
  .monitoring-grid .monitoring-vital:nth-child(5) { display: none; }
}

@media (max-width: 480px) {
  .badge-unlock { left: 16px; right: 16px; transform: translateY(0); min-width: unset; }
  .badge-unlock.show { transform: translateY(-90px); }
  .notif-drawer { width: 100%; right: -100%; }
}

/* ── FHIR Preview amélioré ── */
.fhir-resource-blue   { border-left: 3px solid #58a6ff; }
.fhir-resource-teal   { border-left: 3px solid #39d353; }
.fhir-resource-green  { border-left: 3px solid #3fb950; }
.fhir-resource-orange { border-left: 3px solid #ed8936; }
.fhir-resource-purple { border-left: 3px solid #a371f7; }
.fhir-resource-red    { border-left: 3px solid #f85149; }

.fhir-json-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.fhir-json-tab {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.fhir-json-tab.active,
.fhir-json-tab:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ── Exam card clickable ── */
.exam-card-clickable {
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.exam-card-clickable:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 16px rgba(88,166,255,.15);
  transform: translateY(-2px);
}
