:root {
    --fond: #f5f4f1;
    --carte: #ffffff;
    --texte: #1b1b19;
    --doux: #6e6e68;
    --trait: #e2e1dc;
    --accent: #3a5a8c;
    --danger: #9c3328;
}
* { box-sizing: border-box; }
body {
    margin: 0; padding: 2rem 1rem;
    background: var(--fond); color: var(--texte);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.55;
}
main { max-width: 46rem; margin: 0 auto; }
h1 { font-size: 1.7rem; margin: 0 0 1.5rem; }
h2 { font-size: .95rem; color: var(--doux); font-weight: 600; margin: 2rem 0 .75rem; }
.carte {
    background: var(--carte); border: 1px solid var(--trait);
    border-radius: 8px; padding: 1.1rem; margin-bottom: .75rem;
}
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; }
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .2rem; }
input, textarea {
    width: 100%; padding: .5rem .7rem; border: 1px solid var(--trait);
    border-radius: 6px; font: inherit; background: var(--fond); margin-bottom: .75rem;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
button {
    background: var(--accent); color: #fff; border: 0; border-radius: 6px;
    padding: .5rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { opacity: .9; }
button.secondaire { background: var(--doux); }
button.danger { background: transparent; color: var(--danger); padding: .35rem .7rem;
    border: 1px solid var(--trait); font-size: .82rem; font-weight: 500; }
button.danger:hover { background: var(--danger); color: #fff; }
.recherche { display: flex; gap: .5rem; align-items: center; margin: 1.5rem 0 0; }
.recherche input { margin-bottom: 0; }
.lien { color: var(--accent); font-size: .85rem; white-space: nowrap; }
.contact { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.contact strong { display: block; }
.detail { display: inline-block; font-size: .85rem; color: var(--doux); margin-right: 1rem; }
.notes { margin: .4rem 0 0; font-size: .88rem; color: var(--doux); }
.alerte { padding: .7rem 1rem; border-radius: 6px; font-size: .9rem; }
.erreur { background: #fdeceb; color: #8a2018; }
.succes { background: #e9f3ec; color: #1e5b3a; }
.vide { color: var(--doux); font-style: italic; }
