/* Solveo — Plateforme de tutoriels */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --surface: #f8f9fc;
    --card-radius: 0.625rem;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--surface);
    color: #1a1a2e;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.main-content {
    min-height: calc(100vh - 160px);
}

.navbar-brand {
    letter-spacing: -0.02em;
}

.nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
}

.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.tutorial-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.tutorial-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.tutorial-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.placeholder-cover {
    height: 180px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.hero-section {
    background: linear-gradient(135deg, #fff 0%, #eef1ff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tutorial-cover {
    height: 280px;
    background-size: cover;
    background-position: center;
}

.preview-banner {
    position: sticky;
    top: 56px;
    z-index: 100;
}

.tutorial-block {
    margin-bottom: 2rem;
}

.block-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-style: italic;
}

.block-code {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 1.25rem;
    border-radius: var(--card-radius);
    overflow-x: auto;
    font-size: 0.875rem;
}

.prose h2, .prose h3, .prose h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.block-download {
    border-left: 4px solid var(--primary);
}

.search-mode-group .btn-check:checked + .btn {
    background-color: var(--primary);
    border-color: var(--primary);
}

.admin-body {
    background: #f0f2f8;
}

.stat-card {
    border-radius: var(--card-radius);
}

.stat-value {
    line-height: 1.2;
}

.editor-page .editor-block {
    border: 2px solid transparent;
    transition: border-color 0.15s ease;
}

.editor-page .editor-block.drag-over {
    border-color: var(--primary);
}

.drag-handle {
    cursor: grab;
    font-size: 1.25rem;
    color: #6c757d;
    user-select: none;
    padding: 0 0.25rem;
}

.drag-handle:active {
    cursor: grabbing;
}

.editor-block-header {
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.block-toolbar {
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
}

.blocks-editor .editor-block.dragging {
    opacity: 0.5;
}

.upload-progress {
    height: 6px;
    border-radius: 3px;
    margin-top: 0.5rem;
}

.audio-recorder {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--card-radius);
}

.audio-recorder.recording {
    background: #fff3cd;
}

.recorder-controls .btn {
    min-width: 100px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .tutorial-cover {
        height: 180px;
    }

    .hero-section .display-5 {
        font-size: 1.75rem;
    }

    .editor-block-header .block-actions {
        flex-wrap: wrap;
    }

    .block-toolbar .btn {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .tutorial-meta {
        gap: 0.75rem !important;
    }

    .stat-card .stat-value {
        font-size: 1.5rem !important;
    }
}

.text-primary {
    color: var(--primary) !important;
}

.badge {
    font-weight: 500;
}

.cover-thumb {
    max-height: 160px;
    width: 100%;
    object-fit: cover;
}

.cover-placeholder {
    height: 120px;
    background: #e9ecef;
    font-size: 0.875rem;
}

.cover-progress {
    height: 4px;
}

.table th {
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}
