:root {
    --color-primary: #004a99;
    --color-secondary: #007bff;
    --color-background: #f8f9fa;
    --color-text: #333333;
    --color-border: #dee2e6;
    --color-success: #28a745;
    --color-warning: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

h1, h2, h3 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
    margin-top: 0;
}

header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
}

nav a {
    color: var(--color-primary);
    text-decoration: none;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: var(--color-secondary);
    color: white;
}

.form-section {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.required-field::after {
    content: "*";
    color: red;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-primary);
}

input[type="text"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

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

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-success);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1.1em;
}

.alert-list ul {
    list-style: none;
    padding: 0;
}

.alert-list li {
    background-color: var(--color-warning);
    color: var(--color-text);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    border-left: 5px solid #e0b400;
}

.login-box {
    width: 350px;
    margin: 15vh auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box h2 {
    border-bottom: none;
    margin-bottom: 30px;
}

.echantillon-item {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}
.echantillon-item input[type="number"] {
    width: 80px;
    flex-grow: 0;
}
.text-danger {
    color: #dc3545;
    font-weight: 600;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.filter-form .btn {
    align-self: end;
    height: 42px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

th, td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
}

thead tr {
    background-color: #e9ecef;
    color: var(--color-primary);
    font-weight: 600;
}