@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-page: #edf4fa;
    --card-bg: #ffffff;
    --grid-line: #f1f5f9;
    --hour-height: 68px;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    color: #334155;
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Ambient Vector Circles in background */
.bg-ambient-circle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.circle-1 {
    width: 700px;
    height: 700px;
    border: 70px solid rgba(224, 242, 254, 0.4);
    top: -150px;
    left: 20%;
}
.circle-2 {
    width: 900px;
    height: 900px;
    border: 90px solid rgba(219, 234, 254, 0.35);
    bottom: -200px;
    right: 5%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Timetable Grid specifics */
.timetable-grid {
    position: relative;
    min-width: 820px;
}

.hour-row {
    height: var(--hour-height);
    border-top: 1px solid #f1f5f9;
}

.hour-label {
    height: var(--hour-height);
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

/* Card Pastels matching screenshot */
.course-card {
    position: absolute;
    border-radius: 12px;
    padding: 8px 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 10;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

/* Emerald / Green Theme (CM) */
.course-emerald {
    background-color: #EAF8EE;
    border-top: 3.5px solid #22C55E;
    color: #14532D;
}
.course-emerald .course-tag {
    color: #16A34A;
}

/* Amber / Yellow Theme (TD) */
.course-amber {
    background-color: #FEF7EA;
    border-top: 3.5px solid #F59E0B;
    color: #78350F;
}
.course-amber .course-tag {
    color: #D97706;
}

/* Rose / Pink Theme (Options / Langues) */
.course-rose {
    background-color: #FDF0F3;
    border-top: 3.5px solid #F43F5E;
    color: #881337;
}
.course-rose .course-tag {
    color: #E11D48;
}

/* Blue / Indigo Theme (Tutorat / Perso) */
.course-blue {
    background-color: #EFF6FF;
    border-top: 3.5px solid #3B82F6;
    color: #1E3A8A;
}
.course-blue .course-tag {
    color: #2563EB;
}

/* Purple Theme (Autre) */
.course-purple {
    background-color: #F5F3FF;
    border-top: 3.5px solid #8B5CF6;
    color: #4C1D95;
}
.course-purple .course-tag {
    color: #7C3AED;
}

/* Debt Course Theme (AJAC / Rattrapages) */
.course-debt {
    background-color: #FAF5FF;
    border-top: 3.5px solid #9333EA;
    border-left: 1px solid rgba(147, 51, 234, 0.25);
    border-right: 1px solid rgba(147, 51, 234, 0.25);
    border-bottom: 1px solid rgba(147, 51, 234, 0.25);
    color: #581C87;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08);
}
.course-debt .course-tag {
    color: #7E22CE;
}
.course-debt:hover {
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.16);
}

/* Attendance state modifiers */
.course-card.status-absent {
    opacity: 0.55;
    filter: grayscale(0.5);
    border-top-color: #ef4444 !important;
}

.course-card.search-dimmed {
    opacity: 0.15;
    filter: grayscale(1);
    transform: scale(0.98);
}

.course-card.search-highlight {
    box-shadow: 0 0 0 3px #3b82f6, 0 10px 25px rgba(59, 130, 246, 0.25);
    z-index: 25;
}

/* Detail Popover Card matching reference screenshot */
.detail-popover {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

/* ========================================== */
/* SKELETON LOADING & SHIMMER EFFECT          */
/* ========================================== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 6px;
    border-radius: 4px;
}

.skeleton-card {
    position: absolute;
    border-radius: 12px;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Current time indicator line */
.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef4444;
    z-index: 30;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.current-time-dot {
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.9);
}

/* Today Column Highlight */
.today-col-highlight {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.5) 0%, rgba(248, 250, 252, 0.15) 100%);
}

/* Animations */
.animate-pop-in {
    animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.94) translateY(6px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
