@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&family=Inter:wght@400;500;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --accent: #ff7c24;
    --accent-dark: #e66a1a;
    --accent-glow: rgba(255, 124, 36, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 3rem 2rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.title-group h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2.8rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}

.title-group p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    background: var(--accent-glow);
    color: var(--accent);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content h2 {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.feed-title {
    margin: 4rem 0 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pulse {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.doc-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.doc-group:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.doc-group-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.task-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.order-badge {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
}

.status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-success { background: #dcfce7; color: #166534; }
.status-duplicate { background: #fee2e2; color: #991b1b; }
.status-running { background: #e0f2fe; color: #075985; }

.doc-logs {
    background: #0f172a;
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.doc-group.open .doc-logs {
    max-height: 2000px;
    padding: 1rem;
}

.log-mini {
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.log-mini:last-child {
    border-bottom: none;
}

.log-mini:hover { background: rgba(255, 255, 255, 0.05); }

.badge-type {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    margin-right: 1.25rem;
    min-width: 85px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.log-msg-text {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Couleurs Terminal spécifiques */
.badge-type-webhook { background: #3b82f622; color: #60a5fa; }
.badge-type-bdc { background: #ff7c2422; color: #ff7c24; }
.badge-type-baserow { background: #10b98122; color: #34d399; }
.badge-type-erreur { background: #ef444422; color: #f87171; }
.badge-type-fichier { background: #f59e0b22; color: #fbbf24; }
.badge-type-avertissement { background: #f59e0b22; color: #fbbf24; }

.logout-link {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}
.logout-link:hover { color: #f87171; }

.chevron {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.doc-group.open .chevron {
    transform: rotate(180deg);
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 124, 36, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 124, 36, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 124, 36, 0); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
