/* Reset et variables */
:root {
    --primary: #c9a227;
    --primary-dark: #b89220;
    --primary-light: #f5ecd3;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

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

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tagline {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

/* Main */
.main {

}

/* Upload Form */
.upload-form {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
}

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.dropzone.dragover {
    transform: scale(1.01);
}

.dropzone-icon {
    color: white;
    margin-bottom: 16px;
}

.dropzone-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.dropzone-subtext {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.dropzone-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-text {
    background: transparent;
    color: var(--danger);
    padding: 8px 16px;
}

.btn-text:hover {
    background: rgba(220, 53, 69, 0.1);
}

.btn-browse {
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    margin-top: 24px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Files List */
.files-list {
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.files-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.files-container {
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.file-size {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.file-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-progress {
    width: 80px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.file-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1.25rem;
    transition: var(--transition);
}

.file-remove:hover {
    color: var(--danger);
}

.files-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

/* Sender Info */
.sender-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sender-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: white;
}

.required {
    color: #ff6b6b;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Upload Progress */
.upload-progress {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 32px;
    text-align: center;
}

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

.progress-header h3 {
    font-size: 1.1rem;
    color: white;
}

#progressPercent {
    font-weight: 700;
    color: white;
    font-size: 1.25rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #d4af37);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Success Message */
.success-message {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 48px 32px;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.success-message h2 {
    color: #7bed9f;
    margin-bottom: 12px;
}

.success-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.success-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.success-details p {
    margin: 0;
    padding: 4px 0;
    color: white;
}

/* Error Message */
.error-message {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 48px 32px;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.error-message h2 {
    color: #ff6b6b;
    margin-bottom: 12px;
}

.error-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 16px;
    padding-bottom: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
}

.footer-secure {
    margin-top: 4px;
    color: rgba(255,255,255,0.9);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 24px 16px;
    }

    .upload-form,
    .upload-progress,
    .success-message,
    .error-message {
        padding: 24px 16px;
    }

    .dropzone {
        padding: 32px 16px;
    }

    .dropzone-icon svg {
        width: 48px;
        height: 48px;
    }

    .dropzone-text {
        font-size: 1.1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .file-item {
        flex-wrap: wrap;
    }

    .file-progress {
        width: 100%;
        order: 4;
        flex-basis: 100%;
        margin-top: 8px;
    }
}

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

.file-item {
    animation: fadeIn 0.3s ease;
}

/* File type icons */
.file-icon-pdf { color: #dc3545; }
.file-icon-doc { color: #007bff; }
.file-icon-xls { color: #28a745; }
.file-icon-img { color: #6f42c1; }
.file-icon-zip { color: #fd7e14; }
.file-icon-default { color: var(--secondary); }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

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

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

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