/**
 * NeuroEEAT - SPA Styles
 * Styles spécifiques à la Single Page Application
 */

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: #0a0a12;
    color: #e0e0e8;
    overflow-x: hidden;
}

.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lab-card {
    background: rgba(20, 20, 40, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.lab-card:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

@media (min-width: 1025px) {
    .lab-card:hover {
        transform: translateY(-5px);
    }
}

/* Sidebar Desktop */
.sidebar {
    width: 280px;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 50;
}

.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
}

/* Sidebar collapsed state (Desktop) */
.sidebar.collapsed {
    width: 80px;
}

.main-content.collapsed {
    margin-left: 80px;
    width: calc(100% - 80px);
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar.collapsed #sidebar-toggle i {
    transform: rotate(180deg);
}

#sidebar-toggle i {
    transition: transform 0.3s ease;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
}

.mobile-overlay {
    display: none;
}

/* Tablette (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .sidebar-text {
        display: none;
    }

    .header-actions .btn-text {
        display: none;
    }

    .header-actions button {
        padding: 0.5rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 100;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .sidebar.mobile-open .sidebar-text {
        display: inline;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .main-content.collapsed {
        margin-left: 0;
        width: 100%;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    .mobile-overlay.active {
        display: block;
    }

    #sidebar-toggle {
        display: none;
    }

    .header-title {
        font-size: 1.25rem;
    }

    .project-selector-wrapper {
        display: none;
    }

    main {
        padding: 1rem !important;
    }

    header {
        padding: 0.75rem 1rem !important;
    }

    .notifications-dropdown {
        width: calc(100vw - 2rem) !important;
        right: -1rem !important;
    }

    .user-name-text {
        display: none;
    }
}

/* Page transition animation */
#app-content {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Markdown & HTML Report Styles */
.prose {
    max-width: none;
    color: #d1d5db;
}

.report-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.report-section {
    margin-bottom: 4rem;
}

.report-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
}

.report-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.report-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 1rem;
}

/* Scores */
.score-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 15, 30, 0.4);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-badge {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
}

.score-high {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.score-medium {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.score-low {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Lists */
.check-list,
.cross-list,
.warning-list {
    list-style: none;
    padding-left: 0 !important;
}

.check-list li::before {
    content: "✓";
    color: #10b981;
    margin-right: 0.75rem;
}

.cross-list li::before {
    content: "✗";
    color: #ef4444;
    margin-right: 0.75rem;
}

.warning-list li::before {
    content: "⚠";
    color: #f59e0b;
    margin-right: 0.75rem;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.prose th,
.prose td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75em;
    text-align: left;
}

.prose th {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Very small mobile */
@media (max-width: 480px) {
    .stat-card h3 {
        font-size: 0.75rem;
    }

    .stat-card p {
        font-size: 1.5rem;
    }
}
