:root {
    --bg: #faf6ef;
    --surface: #ffffff;
    --ink: #1d2b27;
    --muted: #5d6b66;
    --line: #e7e0d4;
    --primary: #24564b;
    --primary-dark: #1a4038;
    --primary-deep: #13302a;
    --accent: #a85a35;
    --danger-bg: #fbeeea;
    --danger: #8a2f22;
    --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

a { color: var(--primary); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.15;
}

p { margin: 0; color: var(--muted); }

.surtitre {
    margin: 0 0 6px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font: 600 1rem var(--font-body);
    cursor: pointer;
    transition: background-color .2s ease;
}
.btn:hover { background: var(--primary-dark); }
.btn--discret { min-height: 44px; background: transparent; color: var(--muted); }
.btn--discret:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.champ input {
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font: 400 1rem var(--font-body);
    color: var(--ink);
}
.champ input:focus { border-color: var(--primary); outline: none; }
.champ-code { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; }

.alerte {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: .95rem;
}

.carte {
    width: min(440px, 100%);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg);
    border-radius: 24px;
}

.formulaire { display: flex; flex-direction: column; gap: 16px; }

/* Pages de connexion */
.page-auth { background: var(--primary-deep); }
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}
.auth .carte { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.marque-auth {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
}
.marque-auth span { font-family: var(--font-body); font-size: .8rem; font-weight: 400; color: var(--muted); }

/* Espace connecté (provisoire, remplacé à l'étape 3) */
.barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--primary-deep);
}
.barre .marque { color: #fff; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.barre .btn--discret { color: #dfeae6; }
.barre .btn--discret:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.contenu { padding: 40px 16px; display: grid; place-items: center; }
.contenu .carte { background: var(--surface); border: 1px solid var(--line); }
