/* Variables CSS pour tes couleurs */
:root {
    --primary-color: #1e3a8a; /* Ton bleu nuit */
    --primary-light: #3b60b7;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --bg-dark: #e9ecef;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --info-color: #007bff;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Réinitialisation et base */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.app-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.app-header h1 .fas {
    margin-right: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.app-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.app-main {
    flex-grow: 1;
    padding: 3rem 0;
}

.upload-section, .info-section {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2.5rem;
}

.upload-section h2, .info-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Drop Area (Zone de glisser-déposer) */
.drop-area {
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease-in-out;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden; /* Pour la barre de progression */
}

.drop-area:hover, .drop-area.drag-over {
    border-color: var(--primary-light);
    background-color: var(--bg-dark);
    box-shadow: var(--shadow-hover);
}

.drop-label {
    display: block;
    cursor: pointer;
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drop-area:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-label p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.browse-link {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.file-name {
    display: block;
    margin-top: 1rem;
    font-style: italic;
    color: #666;
    word-break: break-all; /* Pour les noms de fichiers longs */
}

/* Bouton d'action */
.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.action-button .fas {
    margin-right: 10px;
}

.action-button:hover:not(:disabled) {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.action-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Messages d'état */
.status-message {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
    min-height: 20px; /* Pour éviter le "saut" de la page */
}
.status-message.success { color: var(--success-color); }
.status-message.error { color: var(--error-color); }
.status-message.info { color: var(--info-color); }

/* Barre de progression */
.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar-container.visible {
    opacity: 1;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.3s ease-out;
}


/* Info Section - Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.card h3 .fas {
    margin-right: 10px;
    font-size: 1.5rem;
}

.card p {
    font-size: 0.95rem;
    color: #555;
}

/* Footer */
.app-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto; /* Pousse le footer vers le bas */
}

/* Media Queries pour le Responsive Design */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 2rem;
    }
    .upload-section, .info-section {
        padding: 1.5rem;
    }
    .action-button {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.8rem;
    }
    .upload-icon {
        font-size: 3rem;
    }
    .drop-label p {
        font-size: 1rem;
    }
    .file-name {
        font-size: 0.9rem;
    }
    .info-cards {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
    }
}