/* Fichier: style.css */
/* Design moderne pour VPS 1&1 - Conforme à la charte graphique */

:root {
    /* Couleurs principales */
    --primary: #4F46E5;
    --primary-hover: #1c13b2;
    --primary-light: #ffffff;
    --primary-dark: #020098;
    
    /* Couleurs secondaires */
    --secondary: #10B981;
    --secondary-hover: #00864e;
    --secondary-light: #f5ffff;
    
    /* Accent */
    --accent: #F59E0B;
    --accent-hover: #c26b00;
    
    /* Neutres */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Statuts */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    /* Typographie */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height: 1.5;
    
    /* Espacements & rayons */
    --spacing: 1rem;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-900);
}

.container {
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.5s ease;
}

/* Logo et titre */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.logo:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.logo i {
    font-size: 40px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.15);
}

/* Zone de drop */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: linear-gradient(to bottom, var(--primary-light), var(--gray-50));
    transform: translateY(-2px);
}

.drop-zone.active {
    border-color: var(--primary);
    background: linear-gradient(to bottom, rgba(79, 70, 229, 0.05), rgba(79, 70, 229, 0.02));
    box-shadow: var(--shadow-md);
}

.drop-zone i {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 20px;
    transition: var(--transition);
}

.drop-zone:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.drop-zone h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.drop-zone p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Informations fichier */
.file-info {
    display: none;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--gray-200);
}

.file-info.visible {
    display: flex;
    animation: slideIn 0.3s ease;
}

.file-info i {
    font-size: 32px;
    color: var(--primary);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.file-size {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.file-time {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Boutons */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    box-shadow: var(--shadow);
}

.btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn.pulse {
    animation: pulse 2s infinite;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn.copied {
    background: var(--success) !important;
}

/* Section de progression */
.progress-section {
    display: none;
    text-align: center;
}

.progress-section.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

#progressLabel {
    margin-bottom: 12px;
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 500;
}

.progress-bar {
    background: var(--gray-200);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 0.3s ease;
    border-radius: 999px;
    position: relative;
}

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

/* Section résultats */
.results-section {
    display: none;
}

.results-section.visible {
    display: block;
    animation: slideIn 0.3s ease;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.report-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    font-weight: 700;
}

.report-header > div {
    display: flex;
    gap: 12px;
}

.report-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.report-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.report-content {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 24px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.report-content::-webkit-scrollbar {
    width: 8px;
}

.report-content::-webkit-scrollbar-track {
    background: transparent;
}

.report-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 999px;
}

.report-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Input file caché */
input[type="file"] {
    display: none;
}

/* Toasts */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--gray-900);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateX(400px);
    transition: var(--transition);
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
}

.toast.toast-success {
    background: var(--success);
}

.toast.toast-error {
    background: var(--danger);
}

.toast.toast-warning {
    background: var(--warning);
}

.toast.toast-info {
    background: var(--info);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
    
    .card {
        padding: 24px;
    }
    
    .drop-zone {
        padding: 40px 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-header > div {
        width: 100%;
        justify-content: space-between;
    }
    
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* Mode sombre (si l'utilisateur le préfère) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    }
    
    .card {
        background: var(--gray-800);
        color: var(--gray-100);
    }
    
    .drop-zone {
        background: var(--gray-900);
        border-color: var(--gray-600);
    }
    
    .drop-zone:hover {
        background: var(--gray-800);
        border-color: var(--primary);
    }
    
    .file-info {
        background: var(--gray-900);
        border-color: var(--gray-700);
    }
    
    .report-content {
        background: var(--gray-900);
        border-color: var(--gray-700);
        color: var(--gray-200);
    }
    
    .file-name,
    .report-header h2 {
        color: var(--gray-100);
    }
    
    .drop-zone h3 {
        color: var(--gray-200);
    }
    
    .drop-zone p,
    .file-size,
    #progressLabel {
        color: var(--gray-400);
    }
}