/* RESET & BASE */
:root {
    --primary: #6366f1; /* Indigo moderne */
    --primary-hover: #4f46e5;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* LAYOUT */
.app-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.main-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    overflow: hidden;
    position: relative;
}

/* HEADER */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.header-text h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.header-text p {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* STATUS PILL */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 25px;
    background: #f9fafb;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d5db;
    margin-right: 8px;
}

/* États du status */
.status-pill.processing { background: #eff6ff; color: var(--primary); border-color: #bfdbfe; }
.status-pill.processing .status-dot { background-color: var(--primary); box-shadow: 0 0 0 4px #e0e7ff; }

.status-pill.success { background: #ecfdf5; color: var(--success); border-color: #a7f3d0; }
.status-pill.success .status-dot { background-color: var(--success); }

/* UPLOAD AREA */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
    margin-bottom: 25px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: #eef2ff;
}

.cloud-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.upload-area:hover .cloud-icon { color: var(--primary); }

.upload-content h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.upload-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.browse-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
}

/* SETTINGS (Toggle Switch) */
.settings-area {
    background: #fff;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-title {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

.label-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* The Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* FILE LIST */
.hidden { display: none; }
.file-list-container h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.file-item {
    background: #f3f4f6; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem;
    margin-bottom: 5px; display: flex; align-items: center;
}
.file-item i { margin-right: 8px; color: var(--text-muted); }

/* LOGS */
.logs-wrapper {
    background: #1e1e1e; /* Dark background only for logs console feel */
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: 1px solid #374151;
    padding-bottom: 5px;
}

.logs-header button {
    background: none; border: none; color: #6b7280; cursor: pointer;
}
.logs-header button:hover { color: #fff; }

.logs-list {
    list-style: none; padding: 0; margin: 0;
    max-height: 150px; overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.logs-list li { margin-bottom: 4px; color: #d1d5db; line-height: 1.4; display: flex; }
.logs-list li.info { color: #60a5fa; }
.logs-list li.success { color: #34d399; }
.logs-list li.error { color: #f87171; }
.log-icon { display: inline-block; width: 15px; flex-shrink: 0; }

/* FOOTER */
.app-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.75rem;
    color: #9ca3af;
}