/* Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --error: #ef4444;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

/* Container principal */
.upload-container {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 2rem;
    width: min(600px, 90vw);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

.upload-container.highlight {
    border-color: var(--primary-color);
    background: #f0f9ff;
    transform: scale(1.02);
}

/* Boutons et inputs */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

#expiry {
    margin: 1.5rem 0;
    padding: 0.75rem;
    width: 200px;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

#expiry:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.2);
}

/* Zone de statut */
#status {
    margin-top: 2rem;
    width: min(600px, 90vw);
}

.upload-status {
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.upload-status progress {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    margin: 0.5rem 0;
}

.upload-status progress::-webkit-progress-bar {
    background-color: var(--border);
    border-radius: 3px;
}

.upload-status progress::-webkit-progress-value {
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Liste des fichiers */
.file-list-container {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.file-list-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

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

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

.file-item .file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    margin-right: 1rem;
}

.file-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.file-info p {
    margin: 0.25rem 0;
}

.file-item .remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.file-item .remove-file:hover {
    background-color: rgb(239 68 68 / 0.1);
}

.total-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.total-info .total-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

/* Résultat du lien */
.link-result {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.link-container {
    display: flex;
    gap: 0.5rem;
}

.link-container input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--text);
    background: var(--background);
}

.expiry-info {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Messages */
.success-message {
    color: var(--success);
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgb(34 197 94 / 0.1);
    border-radius: 0.5rem;
}

.error-message {
    color: var(--error);
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgb(239 68 68 / 0.1);
    border-radius: 0.5rem;
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}
