body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #FFFFFF;
    min-height: 100vh;
}

header {
    background: rgba(0, 71, 186, 0.95);
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(209, 232, 249, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    font-size: 0.9rem;
}

.user-info span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.logout-btn {
    background: rgba(246, 205, 215, 0.8) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    font-size: 0.85rem !important;
    transition: background-color 0.3s ease !important;
}

.logout-btn:hover {
    background: rgba(246, 205, 215, 1) !important;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

main {
    padding: 30px;
}

h1, h2, h3 {
    color: #0047BA;
    margin-bottom: 20px;
}

/* Formulaire d'upload */
.upload-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px dashed #D1E8F9;
    transition: border-color 0.3s ease;
}

.upload-form:hover {
    border-color: #0047BA;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0047BA;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #D1E8F9;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #0047BA;
    box-shadow: 0 0 0 3px rgba(0, 71, 186, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #D1E8F9 0%, #0047BA 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 71, 186, 0.3);
}

/* Section des résultats */
.results-section {
    margin-top: 30px;
}

.file-info {
    background: #D1E8F9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #0047BA;
}

/* Statistiques */
.stats-section {
    margin: 30px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.total {
    background: linear-gradient(135deg, #0047BA 0%, #D1E8F9 100%);
    color: white;
}

.stat-card.success {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

.stat-card.error {
    background: linear-gradient(135deg, #D1E8F9 0%, #ffffff 100%);
    color: white;
}

.stat-card.rate {
    background: linear-gradient(135deg, #D1E8F9 0%, #0047BA 100%);
    color: white;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 0;
}

.results-table th {
    background: linear-gradient(135deg, #0047BA 0%, #D1E8F9 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #D1E8F9;
    vertical-align: middle;
}

.results-table tr:hover {
    background-color: #D1E8F9;
}

.errors-table tr:hover {
    background-color: rgba(246, 205, 215, 0.3);
}

.success-table tr:hover {
    background-color: #f0fff4;
}

.amount {
    font-weight: bold;
    color: #0047BA;
    text-align: right;
}

.reject-reason {
    background: #F44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.success-status {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Section des paiements validés (collapsible) */
.success-section {
    margin: 30px 0;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    overflow: hidden;
}

.success-section summary {
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    outline: none;
}

.success-section summary:hover {
    background: #45a049;
}

.success-section[open] summary {
    border-bottom: 2px solid #4CAF50;
}

/* Section de téléchargement */
.download-section {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: #D1E8F9;
    border-radius: 10px;
}

.btn-download {
    background: linear-gradient(135deg, #0047BA 0%, #D1E8F9 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 71, 186, 0.3);
}

/* Messages flash */
.flash-messages {
    margin: 20px 0;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid;
}

.alert-warning {
    background-color: #D1E8F9;
    border-color: #0047BA;
    color: #0047BA;
}

footer {
    background: rgba(0, 71, 186, 0.95);
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 0 15px;
    }
    
    main {
        padding: 20px 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 6px;
    }
}

.error {
    color: red;
    font-weight: bold;
}

.success {
    color: green;
    font-weight: bold;
}