/* Variables CSS pour une maintenance facile */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --error-color: #d64045;
    --success-color: #4caf50;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

.header h1 i {
    margin-right: 10px;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Section de téléchargement */
.upload-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-upload,
.btn-submit {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover,
.btn-submit:hover {
    background-color: var(--secondary-color);
}

.btn-upload i,
.btn-submit i {
    font-size: 1.1rem;
}

#uploadInputFile {
    display: none;
}

.file-selected {
    font-size: 0.9rem;
    color: var(--secondary-color);
    word-break: break-all;
}

.error-msg {
    color: var(--error-color);
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* Barre de progression */
#progress-container {
    height: 6px;
    background-color: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}

#progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.3s;
}

/* Section de liste des fichiers */
.file-list-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.file-list-section h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.total-size {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    transition: transform 0.2s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.file-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    margin-right: 10px;
}

.file-link:hover {
    text-decoration: underline;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
}

.file-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.deletion-time {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-code {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
}

.btn-delete {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
}

.btn-delete:hover {
    color: #9c2727;
}

.no-files {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .file-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-actions {
        align-items: flex-start;
    }
}

/* Barre d'espace utilisé */
.storage-info {
    margin-bottom: 20px;
}

.storage-bar-container {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.storage-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.storage-percentage {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: right;
    margin-top: 5px;
}
