/**
 * EXCAVATOR v2 - Styles CSS
 * Design minimaliste avec passes de traitement
 */

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

:root {
    --white: #ffffff;
    --bg-light: #fcfbf8;
    --bg-subtle: #f9f6f1;
    
    --text-primary: #3b2a1e;
    --text-secondary: #8b7764;
    --text-muted: #b8a394;
    
    --accent-primary: #ee993f;
    --accent-secondary: #e26d36;
    --gradient-primary: linear-gradient(135deg, #d4382c 0%, #ffdb4c 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --gradient-info: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    
    --diff-add-bg: #dcfce7;
    --diff-add-text: #166534;
    --diff-del-bg: #fee2e2;
    --diff-del-text: #991b1b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.app-container { max-width: 1400px; margin: 0 auto; padding: 2rem; }

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--bg-subtle);
    margin-bottom: 2rem;
}

.app-logo { 
    display: flex; align-items: center; gap: 0.75rem; 
    background: url(../img/logo_excavator.png) center left no-repeat;
    background-size: contain;
    min-width:300px;
    min-height:40px;
}

.app-logo-icon {
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem;
}

.app-logo-text {
    font-size: 1.75rem; font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-subtitle { font-size: 0.875rem; color: var(--text-muted); }

.version-badge {
    background: var(--gradient-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-subtle);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body { padding: 1.5rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-sm); }
.btn-success { background: var(--gradient-success); color: white; }
.btn-danger { background: var(--gradient-danger); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--bg-subtle); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* Dropzone */
.dropzone {
    border: 2px dashed var(--bg-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    background: var(--bg-light);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
    width: 64px; height: 64px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.75rem;
}

.dropzone-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.dropzone-subtitle { color: var(--text-muted); font-size: 0.875rem; }

/* Passes Grid */
.passes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.pass-card {
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/*.pass-card:hover { background: var(--white); box-shadow: var(--shadow-md); }*/

.pass-card.active {
    border-color: var(--accent-primary);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.pass-card.disabled { opacity: 0.5; cursor: not-allowed; }

.pass-icon {
    width: 44px; height: 44px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.pass-card.active .pass-icon { background: var(--bg-light); }

.pass-info { flex: 1; min-width: 0; }
.pass-name { font-weight: 600; margin-bottom: 0.25rem; }
.pass-desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.4; }

.pass-checkbox {
    width: 20px; height: 20px;
    border: 2px solid var(--bg-subtle);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.pass-card.active .pass-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* File List */
.file-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 400px; overflow-y: auto; }

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.file-item:hover { background: var(--bg-subtle); }

.file-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}

.file-icon.md { background: var(--gradient-info); color: white; }
.file-icon.json { background: var(--gradient-warning); color: white; }
.file-icon.txt { background: var(--gradient-success); color: white; }

.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.8125rem; color: var(--text-muted); }

.file-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-progress-bar {
    width: 80px; height: 6px;
    background: var(--bg-subtle);
    border-radius: 3px;
    overflow: hidden;
}

.file-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending { background: var(--bg-subtle); color: var(--text-secondary); }
.status-processing { background: #dbeafe; color: #1d4ed8; }
.status-processed { background: #dcfce7; color: #166534; }
.status-error { background: #fee2e2; color: #991b1b; }

/* Export Format Toggle */
.format-toggle {
    display: flex;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

.format-option {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    border: none;
    background: transparent;
}

.format-option:hover { color: var(--text-primary); }

.format-option.active {
    background: var(--white);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

/* Diff View */
.diff-container {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.diff-header {
    padding: 0.75rem 1rem;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.diff-tabs { display: flex; gap: 0.5rem; }

.diff-tab {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.diff-tab.active { background: var(--white); color: var(--accent-primary); }

.diff-content {
    padding: 1rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 500px;
    overflow-y: auto;
}

.diff-add { background: var(--diff-add-bg); color: var(--diff-add-text); }
.diff-del { background: var(--diff-del-bg); color: var(--diff-del-text); text-decoration: line-through; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--bg-subtle);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

.stat-card.success .stat-value { background: var(--gradient-success); -webkit-background-clip: text; }

/* Run List */
.run-list { display: flex; flex-direction: column; gap: 0.75rem; }

.run-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.run-item:hover { background: var(--white); box-shadow: var(--shadow-md); }
.run-item.active { border-color: var(--accent-primary); background: var(--white); }

.run-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.25rem;
}

.run-info { flex: 1; }
.run-name { font-weight: 600; margin-bottom: 0.25rem; }
.run-meta { font-size: 0.8125rem; color: var(--text-muted); }

/* Progress Bar */
.progress-bar { height: 8px; background: var(--bg-subtle); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-primary); transition: width var(--transition-normal); }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 600px;
    max-height: 90vh; overflow: auto;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--bg-subtle);
    display: flex; align-items: center; justify-content: space-between;
}

.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--bg-subtle); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.875rem; }

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--bg-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-input:focus { outline: none; border-color: var(--accent-primary); }

/* Empty State */
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

.empty-icon {
    width: 80px; height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}

.empty-title { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }

/* Toast */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.75rem; }

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.success { border: 4px solid #10b981; }
.toast.error { border: 4px solid #ef4444; }
.toast.warning { border: 4px solid #f59e0b; }
.toast.info { border: 4px solid #0ea5e9; }

/* Loader */
.loader { width: 24px; height: 24px; border: 3px solid var(--bg-subtle); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Main Grid Layout */
.main-grid { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; min-height: calc(100vh - 200px); }
.sidebar { display: flex; flex-direction: column; gap: 1rem; }
.content-area { display: flex; flex-direction: column; gap: 1.5rem; }
.action-bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--bg-light); border-radius: var(--radius-lg); flex-wrap: wrap; gap: 1rem; }

/* Export List */
.export-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 500px; overflow-y: auto; }

.export-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.font-medium { font-weight: 500; }
.hidden { display: none !important; }

@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr; }
    .passes-grid { grid-template-columns: 1fr; }
}


/* ===== PROCESSING PROGRESS ===== */
.processing-panel {
    background: var(--white);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.processing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.processing-title {
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.processing-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.processing-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.processing-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.processing-stat strong {
    color: var(--text-primary);
}

/* Global progress */
.progress-global {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-label-title {
    font-weight: 500;
}

.progress-label-value {
    color: var(--text-muted);
}

.progress-track {
    height: 12px;
    background: var(--bg-subtle);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-track-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-track-fill.animated {
    background: linear-gradient(
        90deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 50%,
        var(--accent-primary) 100%
    );
    background-size: 200% 100%;
    animation: progressShimmer 1.5s linear infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Current file progress */
.progress-current-file {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.current-file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.current-file-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-file-name .loader {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.current-pass {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-pass-icon {
    font-size: 1rem;
}

.passes-progress {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.pass-dot {
    flex: 1;
    height: 6px;
    background: var(--bg-subtle);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.pass-dot.completed {
    background: var(--gradient-success);
}

.pass-dot.active {
    background: var(--gradient-primary);
    animation: pulse 1s ease infinite;
}

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

.pass-dot.pending {
    background: var(--bg-subtle);
}


/* ===== LOADING MODAL WITH PROGRESS ===== */
.loading-modal {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.loading-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
}

.loading-icon .loader {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.loading-progress {
    margin-bottom: 1rem;
}

.loading-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.loading-progress-label-left {
    color: var(--text-secondary);
}

.loading-progress-label-right {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.loading-progress-bar {
    height: 10px;
    background: var(--bg-subtle);
    border-radius: 5px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.loading-details {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.loading-detail strong {
    color: var(--text-primary);
}

/* ===== BUTTON WITH PROGRESS FILL ===== */
.btn-progress {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-progress.processing {
    pointer-events: none;
}

.btn-progress.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: var(--progress, 0%);
    width: 30%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    animation: btnShimmer 1s infinite;
    z-index: -1;
}

@keyframes btnShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Current pass indicator in loading */
.loading-current-pass {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.loading-current-pass-icon {
    font-size: 1.125rem;
}

.loading-passes-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.loading-pass-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-subtle);
    transition: all 0.3s ease;
}

.loading-pass-dot.completed {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.loading-pass-dot.active {
    background: var(--accent-secondary);
    animation: dotPulse 0.8s ease infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}



/* ===== INTRO LOGO ===== */

.intro {
    position: absolute;
    width: 440px;
    height: 200px;
    top: 50%;
    left: 50%;
    margin-left: -220px;
    margin-top: -100px;
    animation: 
        fadeInUp 1.2s ease-out forwards,
        moveUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 2s forwards;
    opacity: 0;
}

.intro .text {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(../img/logo_excavator_text.png) center no-repeat;
    background-size: contain;
    animation: textReveal 1s ease-out 0.5s forwards;
    opacity: 0;
}

.intro .square {
    position: absolute;
    width: 76px;
    height: 76px;
    left: 327px;
    top: 69px;
    background: url(../img/logo_excavator_square.png) center no-repeat;
    background-size: contain;
    animation: squareSpin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes moveUp {
    to {
        margin-top: -50%;
        transform:scale(50%);
    }
}

@keyframes textReveal {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes squareSpin {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Bonus : léger glow sur le square */
.intro .square:after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 2s ease-in-out 1.5s infinite;
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Animation intro */
.app-header,
.app-container {
    opacity: 0;
}

@keyframes revealHeader {
    0% {
        opacity: 0;
        transform: translateY(-30px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes revealContainer {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
        filter: blur(8px);
    }
    50% {
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
