/* ============================================================
   QCMédic - Styles & Thème Moderne (Desktop & Mobile-first)
   Inspiré par le design épuré médical de QCMOLOGY
   ============================================================ */

:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-dark: #134e4a;
  --accent-teal: #14b8a6;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #f1f5f9;
}

.dark {
  --primary: #14b8a6;
  --primary-hover: #2dd4bf;
  --primary-light: #134e4a;
  --primary-dark: #042f2e;
  --bg-page: #090d16;
  --bg-surface: #111827;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1f2937;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-tap-highlight-color: transparent;
}

/* Dr. DentIA Chat: Disable text selection and copying to protect AI responses */
#chatMessagesArea,
#chatMessagesArea * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Enable text selection on readable content, explanations, notes */
.selectable-text,
.prose,
p,
span,
h1, h2, h3, h4, h5, h6,
article,
blockquote,
pre,
code {
  user-select: text;
  -webkit-user-select: text;
}

/* Prevent unwanted selection on interactive buttons and navigation */
button,
.btn,
.nav-btn,
[role="button"] {
  user-select: none;
  -webkit-user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* Glassmorphism effects */
.glass-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.85);
}
.dark .glass-nav {
  background-color: rgba(17, 24, 39, 0.88);
}

/* Card hover animations */
.module-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -10px rgba(13, 148, 136, 0.12), 0 6px 12px -4px rgba(0, 0, 0, 0.04);
}

/* Mobile responsive touch feedback */
.active-press:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* Pulse animation for live streak */
@keyframes flamePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6)); }
}
.flame-anim {
  animation: flamePulse 2s infinite ease-in-out;
}

/* Option Selected checkmark pop */
@keyframes checkPop {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.pop-anim {
  animation: checkPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Quiz progress bar strip */
.quiz-progress-fill {
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Safe area for modern mobile iPhones / Android notches */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
