/*
 * Markleex : la feuille UNIQUE du site.
 *
 * MONOCHROME. Toute couleur dérive de --brand : c'est LA ligne à changer.
 * Seul doublon toléré : public/favicon.svg (un SVG servi seul ne lit pas
 * les custom properties du document). Aucune autre couleur en dur, nulle part.
 */
:root {
    --brand: #1e2a5a; /* LA ligne. */

    --paper: color-mix(in oklab, var(--brand) 4%, white);
    --ink: color-mix(in oklab, var(--brand) 90%, black);
    --muted: color-mix(in oklab, var(--brand) 52%, white);
    --line: color-mix(in oklab, var(--brand) 16%, white);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: color-mix(in oklab, var(--brand) 20%, black);
        --ink: color-mix(in oklab, var(--brand) 10%, white);
        --muted: color-mix(in oklab, var(--brand) 34%, white);
        --line: color-mix(in oklab, var(--brand) 55%, black);
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

main,
footer {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

main {
    padding-top: 5rem;
    padding-bottom: 4rem;
}

h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin: 0 0 2rem;
}

h2 {
    font-size: 1.25rem;
    margin: 2.5rem 0 0.75rem;
}

p {
    margin: 0.75rem 0;
}

.lede {
    font-size: 1.25rem;
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: var(--muted);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: var(--ink);
}

.sigil {
    flex: none;
}

header {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 0;
}

.wordmark {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    font-weight: 650;
    text-decoration: none;
}

footer {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
    padding-bottom: 3rem;
    color: var(--muted);
    font-size: 0.875rem;
}

/* Listes de pages et d'accès, communes au public et à la console. */
.pages {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.pages li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}

.pages time {
    color: var(--muted);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.muted,
.hint {
    color: var(--muted);
    font-size: 0.875rem;
}

.meta {
    margin-top: 2.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

/* La console : des formulaires sobres, aux mêmes teintes dérivées de --brand. */
form {
    margin: 1.5rem 0;
}

form.inline {
    display: inline;
    margin: 0;
}

label {
    display: block;
    margin: 1rem 0 0.25rem;
    font-weight: 550;
}

input[type="email"],
input[type="password"],
input[type="text"],
select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

input:focus,
select:focus {
    outline: 2px solid var(--muted);
    outline-offset: 1px;
}

button {
    margin-top: 1.25rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--ink);
    border-radius: 3px;
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    cursor: pointer;
}

button.link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    text-decoration: underline;
    font-size: 0.875rem;
    cursor: pointer;
}

.notice {
    margin: 1rem 0;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--muted);
    background: color-mix(in oklab, var(--brand) 6%, transparent);
}

.notice-error {
    border-left-color: var(--ink);
}
