:root {
    --bg: #020617;
    --bg-alt: #0b1120;
    --bg-card: #020617f2;
    --border: #1f2937;
    --accent: #00d4aa;
    --accent-soft: rgba(0,212,170,0.15);
    --danger: #ef4444;
    --text: #e5e7eb;
    --muted: #9ca3af;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2937 0, #020617 45%, #000 100%);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px; /* base un peu plus grande */
}

/* Background */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.bg-grid {
    position:absolute;
    inset:0;
    background-image:
      linear-gradient(rgba(51,65,85,0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(51,65,85,0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.08;
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px; /* un peu plus large */
    background: linear-gradient(180deg, #020617, #020617f2);
    border-right: 1px solid var(--border);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: radial-gradient(circle at 30% 30%, var(--accent) 0, #0f172a 60%, #020617 100%);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 26px;
    box-shadow: 0 0 22px rgba(0,212,170,0.4);
}
.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
}
.logo-text .version {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.version-badge {
    margin-left: 6px;
    padding: 3px 9px;
    border-radius:999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size:11px;
}

/* Steps */
.nav-steps {
    margin-top: 28px;
    flex:1;
}
.step {
    display:flex;
    align-items:center;
    gap:14px;
    padding: 14px 12px;
    border-radius: 999px;
    cursor:pointer;
    border:1px solid transparent;
    transition: 0.2s;
    margin-bottom:10px;
}
.step:hover { background:#020617; }
.step.active {
    border-color: var(--accent);
    background: rgba(15,23,42,0.9);
}
.step.completed .step-num {
    background: var(--accent);
    color:#020617;
}
.step-num {
    width:34px;
    height:34px;
    border-radius:50%;
    border:1px solid var(--border);
    background:#020617;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:14px;
}
.step-info h3 { font-size:15px; }
.step-info p { font-size:12px; color:var(--muted); }

/* Sidebar footer */
.sidebar-footer {
    border-top:1px solid var(--border);
    padding-top:16px;
}
.sidebar-link {
    display:flex;
    align-items:center;
    gap:9px;
    padding:9px 11px;
    border-radius:11px;
    text-decoration:none;
    color: var(--muted);
    font-size:14px;
}
.sidebar-link:hover {
    background:#020617;
    color: var(--text);
}
.sidebar-link-icon { font-size:17px; }

/* Main */
.main {
    flex:1;
    padding: 30px 34px 34px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Page header */
.page-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    margin-bottom:24px;
    flex-wrap:wrap;
}
.page-title {
    font-size:24px;
    font-weight:800;
}
.page-subtitle {
    font-size:14px;
    color:var(--muted);
    margin-top:5px;
}
.header-actions {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* Cards */
.card {
    background: var(--bg-card);
    border:1px solid var(--border);
    border-radius:18px;
    padding:22px 22px 20px;
    margin-bottom:20px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.6);
}
.card-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}
.card-title {
    display:flex;
    align-items:center;
    gap:9px;
    font-size:17px;
    font-weight:600;
}
.card-title-icon {
    width:28px;
    height:28px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background: var(--accent-soft);
}
.card-badge {
    font-size:13px;
    color:var(--muted);
}

/* Form */
.form-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-bottom:22px;
}
.form-group { display:flex; flex-direction:column; gap:7px; }
.form-label {
    font-size:13px;
    color:var(--muted);
    display:flex;
    align-items:center;
    gap:7px;
}
.form-label-icon { font-size:15px; }
select, input[type="text"] {
    width:100%;
    padding:13px 15px;
    border-radius:11px;
    border:1px solid var(--border);
    background:#020617;
    color:var(--text);
    font-size:15px;
}
select:focus, input:focus {
    outline:none;
    border-color:var(--accent);
    box-shadow:0 0 0 2px var(--accent-soft);
}

/* Checkbox */
.checkbox-wrapper {
    display:flex;
    align-items:center;
    gap:16px;
    padding:13px 15px;
    border-radius:13px;
    border:1px solid var(--border);
    background:#020617;
    margin-bottom:22px;
    cursor:pointer;
}
.checkbox-wrapper input { display:none; }
.checkbox-custom {
    width:22px;
    height:22px;
    border-radius:7px;
    border:2px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
}
.checkbox-wrapper input:checked + .checkbox-custom {
    background:var(--accent);
    border-color:var(--accent);
}
.checkbox-wrapper input:checked + .checkbox-custom::after {
    content:"✓";
    color:#020617;
    font-size:15px;
    font-weight:700;
}
.checkbox-label { font-size:14px; }
.checkbox-label-hint { font-size:13px; color:var(--muted); margin-top:3px; }

/* Buttons */
.btn {
    display:inline-flex;
    align-items:center;
    gap:9px;
    padding:11px 20px;
    border-radius:999px;
    border:none;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
    text-decoration:none;
}
.btn-primary {
    background:linear-gradient(135deg, var(--accent), #00a080);
    color:#020617;
    box-shadow:0 7px 22px rgba(0,212,170,0.5);
}
.btn-primary:hover { transform:translateY(-1px); }
.btn-secondary {
    background:#020617;
    color:var(--text);
    border:1px solid var(--border);
}
.btn-danger {
    background:linear-gradient(135deg, var(--danger), #dc2626);
    color:white;
}
.btn-sm { padding:9px 16px; font-size:13px; }
.btn-icon-sm { width:32px; height:32px; padding:0; justify-content:center; }

/* Sections */
.progress-section { display:none; }
.progress-section.active { display:block; }

/* Progress */
.progress-container { margin-bottom:18px; }
.progress-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:9px;
}
.progress-title { font-size:14px; color:var(--muted); }
.progress-value { font-size:18px; font-weight:700; color:var(--accent); }
.progress-bar {
    width:100%;
    height:12px;
    border-radius:999px;
    background:#020617;
    border:1px solid var(--border);
    overflow:hidden;
}
.progress-fill {
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg, var(--accent), #00ffcc);
    width:0%;
    transition:width 0.4s ease;
}

/* Logs */
.logs-container {
    border-radius:13px;
    border:1px solid var(--border);
    overflow:hidden;
    background:#020617;
}
.logs-header {
    padding:9px 13px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:var(--bg-alt);
    border-bottom:1px solid var(--border);
}
.logs-title {
    font-size:12px;
    text-transform:uppercase;
    color:var(--muted);
}
.logs-actions { display:flex; gap:7px; }
.logs {
    height:220px;
    padding:11px;
    overflow-y:auto;
    font-family:monospace;
    font-size:13px;
    color:var(--muted);
}

/* Stats */
.stats-grid {
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:16px;
    margin-bottom:20px;
}
.stat-card {
    background:#020617;
    border-radius:13px;
    border:1px solid var(--border);
    padding:16px 15px 13px;
}
.stat-icon { font-size:22px; margin-bottom:7px; }
.stat-value { font-size:26px; font-weight:700; }
.stat-label { font-size:12px; color:var(--muted); text-transform:uppercase; }

/* Files */
.files-section {
    border-radius:18px;
    border:1px solid var(--border);
    background:#020617;
    overflow:hidden;
    margin-bottom:20px;
}
.files-toolbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:11px 16px;
    background:var(--bg-alt);
    border-bottom:1px solid var(--border);
    gap:9px;
}
.files-count { font-size:14px; color:var(--muted); }
.files-count strong { color:var(--accent); }
.filter-group { display:flex; align-items:center; gap:9px; }
.filter-label { font-size:13px; color:var(--muted); }
.filter-select {
    padding:7px 11px;
    border-radius:999px;
    border:1px solid var(--border);
    background:#020617;
    color:var(--text);
    font-size:13px;
}
.files-header, .file-row {
    display:grid;
    grid-template-columns:70px 1fr 130px 90px 90px;
    gap:12px;
}
.files-header {
    padding:9px 16px;
    font-size:12px;
    text-transform:uppercase;
    color:var(--muted);
    background:#020617;
    border-bottom:1px solid var(--border);
}
.files-body { max-height:380px; overflow-y:auto; }
.file-row {
    padding:9px 16px;
    border-bottom:1px solid var(--border);
    font-size:14px;
    align-items:center;
}
.file-row:nth-child(even) { background:#020617; }
.file-row:nth-child(odd) { background:#020617e6; }
.files-empty {
    padding:44px 12px;
    text-align:center;
    color:var(--muted);
}
.files-empty-icon { font-size:34px; margin-bottom:12px; }

/* Score badge */
.score-badge {
    width:40px;
    height:40px;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:14px;
}
.score-badge.high { background:linear-gradient(135deg, var(--accent), #00a080); color:#020617; }
.score-badge.medium { background:linear-gradient(135deg, #fbbf24, #f59e0b); color:#020617; }
.score-badge.low { background:#020617; border:1px solid var(--border); color:var(--muted); }

.file-name {
    color:var(--accent);
    font-family:monospace;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
}
.file-path {
    font-size:12px;
    color:var(--muted);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.file-type {
    font-size:12px;
    padding:5px 9px;
    border-radius:999px;
    border:1px solid var(--border);
    background:#020617;
    color:var(--muted);
}
.file-size { font-size:13px; color:var(--muted); }
.file-actions { display:flex; gap:7px; }

/* Deep + Jobs sections (containers) */
.deep-section { margin-bottom:18px; }
.jobs-section { margin-bottom:18px; }

/* Mobile */
@media (max-width: 900px) {
    .app { flex-direction:column; }
    .sidebar { width:100%; position:static; }
    .main { padding:20px 16px 26px; }
    .form-grid { grid-template-columns:1fr; }
    .stats-grid { grid-template-columns:1fr; }
    .files-header, .file-row {
        grid-template-columns:55px 1fr 90px;
    }
    .files-header div:nth-child(4),
    .files-header div:nth-child(5),
    .file-row > div:nth-child(4),
    .file-row > div:nth-child(5) { display:none; }
}

/* Mobile menu btn + toasts placeholders */
.mobile-menu-btn {
    position:fixed;
    bottom:18px;
    right:18px;
    width:50px;
    height:50px;
    border-radius:50%;
    border:none;
    background:var(--accent);
    color:#020617;
    font-size:22px;
    display:none;
}
.toast-container {
    position:fixed;
    bottom:18px;
    left:50%;
    transform:translateX(-50%);
}
