/* Styles pour StudyFlow - Organiseur Scolaire Complet */

:root {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(244, 63, 94, 0.05) 0px, transparent 50%);
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* Glassmorphism */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.glass-nav {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Transitions douces */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab bar active indicator */
.tab-btn.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* Cartes de cours sur l'emploi du temps */
.course-card {
  transition: all 0.2s ease;
  cursor: pointer;
  border-left-width: 4px;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
  filter: brightness(1.08);
}

/* Cours actuellement en direct (En cours) */
.course-card-active {
  border-color: #10b981 !important;
  border-width: 2px 2px 2px 5px !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45), inset 0 0 15px rgba(16, 185, 129, 0.15) !important;
  transform: scale(1.02);
  z-index: 10;
  position: relative;
  background-color: rgba(6, 78, 59, 0.35) !important;
  animation: liveCoursePulse 2.5s infinite ease-in-out;
}

@keyframes liveCoursePulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35), inset 0 0 10px rgba(16, 185, 129, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.65), inset 0 0 20px rgba(16, 185, 129, 0.25);
  }
}

/* Prochain cours à venir dans la journée */
.course-card-upcoming {
  border-color: #f59e0b !important;
  border-width: 2px 2px 2px 5px !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.4), inset 0 0 12px rgba(245, 158, 11, 0.12) !important;
  transform: scale(1.01);
  z-index: 5;
  position: relative;
  background-color: rgba(120, 53, 15, 0.25) !important;
  animation: upcomingCoursePulse 3s infinite ease-in-out;
}

@keyframes upcomingCoursePulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25), inset 0 0 8px rgba(245, 158, 11, 0.08);
  }
  50% {
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.55), inset 0 0 16px rgba(245, 158, 11, 0.2);
  }
}

/* Checkbox personnalisée stylée */
.custom-checkbox {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #475569;
  border-radius: 0.375rem;
  background-color: transparent;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-checkbox:checked {
  background-color: #10b981;
  border-color: #10b981;
}

.custom-checkbox:checked::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background-color: white;
}

/* Animation d'accomplissement */
@keyframes taskCompletedAnim {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.task-completed {
  animation: taskCompletedAnim 0.3s ease;
  text-decoration: line-through;
  opacity: 0.6;
}

/* Minuteur / Timer Circular Glow */
.timer-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

/* Flamme d'habitude / Streak */
@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(3deg); }
}

.flame-anim {
  display: inline-block;
  animation: flamePulse 2s infinite ease-in-out;
}
