/* Reset léger */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    background: #f4f6f9; /* clair et doux */
    color: #1e293b;
    line-height: 1.6;
}

/* Liens / boutons */
a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

button,
input[type="submit"],
input[type="button"] {
    cursor: pointer;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s ease, box-shadow .15s ease;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: #1d4ed8;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 340px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #2563eb30;
}

label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

/* Header clair */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px; /* plus d'espace vertical */
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
}

/* Menu */
.site-nav a {
    margin-left: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #475569;
}
.site-nav a:hover {
    background: #e2e8f0;
    text-decoration: none;
    color: #1e293b;
}

/* Contenu principal */
.site-main {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 20px 40px 20px;
}

/* Titres */
.site-main h1,
section h2,
section h3 {
    color: #1e293b;
}

.site-main > h1 {
    font-size: 22px;
    margin-bottom: 18px;
}

/* Sections / Cartes */
section {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

/* Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin: 14px 0;
}
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.card-title {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}
.card-value {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

/* Tables */
.table,
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.table th,
.table td,
table th,
table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

/* Alternance */
.table tbody tr:nth-child(even),
table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Hover */
.table tbody tr:hover {
    background: #e8efff;
}

/* Alertes */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Login */
body.login-page {
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}
.login-container h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 18px;
    color: #1e293b;
}

/* Footer clair */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}
.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 12px;
}

/* Filtres */
form.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
form.filters label {
    margin-bottom: 0;
    font-size: 13px;
}

/* Fieldset */
fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}
legend {
    font-size: 12px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 700px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
.logo-nav {
    height: 38px;     /* Taille plus visible */
    width: auto;
    margin-right: 10px;
}


.site-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

/* LOGIN PAGE -------------------------------------------------- */

body.login-page {
    background: linear-gradient(135deg, #bfdbfe, #e2e8f0 30%, #ffffff);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Conteneur */
.login-container {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    padding: 34px 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.06),
        0 2px 8px rgba(0,0,0,0.04),
        0 0 2px rgba(0,0,0,0.08);
    animation: loginFade .5s ease-out;
}

/* Animation d’apparition */
@keyframes loginFade {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Titre */
.login-container h1 {
    margin: 0 0 14px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

/* Sous-titre */
.login-subtitle {
    text-align: center;
    margin-bottom: 22px;
    font-size: 14px;
    color: #64748b;
}

/* Champs */
.login-form label {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    display: block;
    margin-bottom: 14px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 14px;
    transition: all .2s ease;
}

.login-form input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px #2563eb33;
    outline: none;
}

/* Bouton */
.login-form button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    transition: background .15s ease, transform .1s ease;
}

.login-form button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.login-form button:active {
    transform: translateY(0);
}

/* Messages d'erreur */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* Pied */
.login-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: #94a3b8;
}

/* Page paramètres */
section h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

form label input[type="password"] {
    max-width: 300px;
}
