/* Lexauto.fr — design system minimal (navy + bleu électrique) */

:root {
    --navy: #0b1220;
    --navy-2: #131b2e;
    --navy-3: #1c2740;
    --blue: #2f5eff;
    --blue-dark: #1e44cc;
    --blue-light: #eaf0ff;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --border: #e2e6ee;
    --text: #171d2b;
    --text-muted: #64708a;
    --text-inverse: #f5f7fc;
    --danger: #dc2626;
    --danger-bg: #fdecec;
    --success: #16a34a;
    --success-bg: #e9f9ef;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 8px rgba(15, 23, 42, 0.04);
    --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
}

/* ---------- Header / nav ---------- */

.site-header {
    background: var(--navy);
    color: var(--text-inverse);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-inverse);
}

.brand:hover {
    text-decoration: none;
}

.brand .accent {
    color: var(--blue);
}

.brand .tld {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    color: var(--blue);
    margin-left: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a {
    color: rgba(245, 247, 252, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text-inverse);
    text-decoration: none;
}

.site-nav form {
    margin: 0;
}

.site-nav button.link-button {
    background: none;
    border: none;
    color: rgba(245, 247, 252, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.site-nav button.link-button:hover {
    color: var(--text-inverse);
}

/* ---------- Layout ---------- */

main.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    margin: 0;
}

/* ---------- Buttons ---------- */

button,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    line-height: 1.2;
}

button:hover,
.btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    text-decoration: none;
}

button[type="submit"],
.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

button[type="submit"]:hover,
.btn-primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #fff;
}

form.inline-action {
    display: inline-block;
    margin: 0 0.15rem;
}

form.inline-action button {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    font-weight: 500;
}

form.inline-action button:hover {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
}

form.inline-action.danger button:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-bg);
}

.actions-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
}

/* ---------- Cards / forms ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    max-width: 560px;
}

.form-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
    color: var(--text);
}

.form-card label:first-of-type {
    margin-top: 0;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="number"],
.form-card input[type="date"],
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-light);
}

.form-card textarea {
    min-height: 6rem;
    resize: vertical;
}

.form-card button[type="submit"] {
    margin-top: 1.5rem;
}

/* ---------- Tables ---------- */

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--bg);
}

/* ---------- Alerts ---------- */

p[role="alert"] {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Login page ---------- */

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 2rem 1rem;
}

.auth-shell .brand {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

.form-card.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-card h1 {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.auth-card button[type="submit"] {
    width: 100%;
    justify-content: center;
}

/* ---------- Misc ---------- */

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1rem;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(22, 163, 74, 0.25);
}

.badge.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.25);
}

.badge.badge-blue {
    background: var(--blue-light);
    color: var(--blue-dark);
    border-color: rgba(47, 94, 255, 0.25);
}
