/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
}

.dashboard .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #1a237e;
}

.stat-card.correct .number { color: #4caf50; }
.stat-card.incorrect .number { color: #ff9800; }
.stat-card.non-trouve .number { color: #f44336; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.action-box h3 {
    color: #1a237e;
    margin-bottom: 10px;
}

.action-box p {
    color: #666;
    margin-bottom: 15px;
}

.btn, .btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #1a237e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover, .btn-primary:hover {
    background: #0d47a1;
}

.btn-primary {
    background: #0d47a1;
}

.upload-form, .scan-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 5px;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.form-group ul {
    margin-left: 20px;
    color: #666;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table thead {
    background: #1a237e;
    color: white;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
}

table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

table tbody tr:hover {
    background: #e8eaf6;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.badge.correct {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge.incorrect {
    background: #ffe0b2;
    color: #e65100;
}

.badge.non-trouve {
    background: #ffcdd2;
    color: #c62828;
}

.scan-result {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.result-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 8px;
}

.result-card.correct {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.result-card.incorrect {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.result-card.non-trouve {
    background: #ffebee;
    border: 2px solid #f44336;
}

.result-icon {
    font-size: 48px;
}

.result-details p {
    margin: 5px 0;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

.filter-group input, .filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.stats-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stat-item strong {
    font-size: 18px;
}

.btn-export, .btn-pdf {
    background: #4caf50;
}

.btn-export:hover, .btn-pdf:hover {
    background: #388e3c;
}

.btn-small {
    display: inline-block;
    padding: 4px 10px;
    background: #1a237e;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.export-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.text-center {
    text-align: center;
    padding: 20px;
    color: #999;
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 8px 10px;
    }
}