/* Styles personnalisés pour TRAVAUX ONLINE */

/* Variables CSS */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #2563eb;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #fdfcf7;
    --dark: #0f172a;
    --bg-body: #fdfcf7;
    /* Warm background */
}

/* Styles globaux */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-body);
    color: var(--primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Utilitaires personnalisés */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard properties for multi-line truncation if needed in future */
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Cards hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Badge colors */
.badge-tfc {
    background-color: #e6fffa;
    color: #234e52;
}

.badge-memoire {
    background-color: #ebf8ff;
    color: #2c5282;
}

.badge-these {
    background-color: #faf5ff;
    color: #553c9a;
}

.badge-article {
    background-color: #f0fff4;
    color: #22543d;
}

.badge-rapport {
    background-color: #fffaf0;
    color: #744210;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Form styles */
.form-input-custom {
    transition: all 0.2s ease;
}

.form-input-custom:focus {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3182ce;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark\:bg-gray-900 {
        background-color: var(--dark);
    }

    .dark\:text-white {
        color: white;
    }
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-stack {
        flex-direction: column !important;
    }

    .mobile-full {
        width: 100% !important;
    }
}

/* PDF viewer custom */
.pdf-viewer {
    height: 600px;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Citation styles */
.citation-box {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border-left: 4px solid #3182ce;
    padding: 1rem;
    border-radius: 0.25rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
}

/* Stat cards animation */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

/* Custom borders */
.border-dashed-custom {
    border-style: dashed;
    border-color: #cbd5e0;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--secondary);
    background-color: #ebf8ff;
}

.file-upload-area.drag-over {
    border-color: var(--accent);
    background-color: #f0fff4;
}