/* ============================================================
   Workflow IA Autonome — Feuille de style
   Mobile-first, variables CSS, animations
   ============================================================ */

:root {
    --primary: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
}

body {
    background-color: #f8fafc;
}

main.container {
    max-width: 1200px;
}

/* ── Navbar : bouton Déconnexion aligné comme les liens voisins ─── */
.nav-link-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* ── Zone d'upload ─────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-item .file-size {
    color: #64748b;
    font-size: 0.8rem;
}

.file-item .btn-remove-file {
    border: none;
    background: none;
    color: var(--danger);
    cursor: pointer;
}

/* ── Cartes agents ─────────────────────────────────────────── */
.agent-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.agent-card.active {
    border-color: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.agent-card.done {
    border-color: var(--success);
    opacity: 0.95;
}

.agent-card.failed {
    border-color: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Barres de progression ─────────────────────────────────── */
.global-progress {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.global-progress .progress-bar {
    border-radius: 15px;
    transition: width 0.6s ease;
}

/* ── Fenêtre de logs (terminal) ────────────────────────────── */
.log-window {
    background-color: #0f172a;
    color: #4ade80;
    font-family: "Courier New", monospace;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.log-line {
    margin-bottom: 4px;
    word-break: break-word;
}

.log-line .log-time {
    color: #64748b;
    margin-right: 8px;
}

.log-line.log-error {
    color: #f87171;
}

/* ── Étapes "Comment ça marche" ────────────────────────────── */
.step-box {
    border-radius: 8px;
    background-color: #f1f5f9;
    height: 100%;
}

/* ── Rapports / code ───────────────────────────────────────── */
.report-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    margin-bottom: 0;
}

.code-tree li {
    padding: 2px 0;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

/* ── Badges de statut ──────────────────────────────────────── */
.badge.bg-running, .badge.bg-pending { background-color: #64748b; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .agent-card {
        padding: 12px;
    }

    .drop-zone {
        padding: 24px;
    }

    .log-window {
        height: 300px;
    }
}
