/*
 * SCANOVA, enrôlement facial : page d'identification.
 * Identité SCANOVA (bleu marine du logo, Plus Jakarta Sans), pensée
 * d'abord pour le téléphone.
 */

:root {
    --eh-accent: #1f3a8f;
    --eh-accent-hover: #172c6e;
    --eh-accent-soft: rgba(31, 58, 143, .08);
    --eh-bg: #f4f6f8;
    --eh-surface: #ffffff;
    --eh-text: #20242a;
    --eh-muted: #697386;
    --eh-border: #dde1e6;
    --eh-danger: #c53030;
    --eh-radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--eh-bg);
    color: var(--eh-text);
    font-family: "Plus Jakarta Sans Variable", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Barre du haut */
.eh-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--eh-surface);
    border-bottom: 1px solid var(--eh-border);
}

.eh-top img { width: 32px; height: 32px; object-fit: contain; }
.eh-top strong { display: block; color: var(--eh-accent); font-size: 15px; letter-spacing: .03em; line-height: 1.1; }
.eh-top small { display: block; color: var(--eh-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.eh-main {
    flex: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 20px 16px 24px;
}

/* Étapes */
.eh-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.eh-steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--eh-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.eh-steps span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--eh-border);
    border-radius: 50%;
    background: var(--eh-surface);
    font-size: 12px;
}

.eh-steps li.is-current { color: var(--eh-accent); }
.eh-steps li.is-current span { border-color: var(--eh-accent); background: var(--eh-accent); color: #fff; }

/* Carte */
.eh-card {
    padding: 22px 18px;
    background: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
}

.eh-card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.eh-lead { margin: 0 0 18px; color: var(--eh-muted); font-size: 14px; }

.eh-field { margin-bottom: 16px; }

.eh-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.eh-field label .bi { color: var(--eh-accent); }

.eh-field select,
.eh-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    background: var(--eh-surface);
    color: var(--eh-text);
    font: inherit;
    font-size: 16px; /* évite le zoom automatique sur iPhone */
}

.eh-field select:focus,
.eh-field input:focus {
    outline: none;
    border-color: var(--eh-accent);
    box-shadow: 0 0 0 3px var(--eh-accent-soft);
}

.eh-field small {
    display: block;
    margin-top: 6px;
    color: var(--eh-muted);
    font-size: 12px;
}

.eh-code {
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.eh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: var(--eh-radius);
    background: var(--eh-accent);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.eh-btn:hover { background: var(--eh-accent-hover); }
.eh-btn:disabled { opacity: .75; cursor: progress; }

.eh-spin {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: eh-spin .7s linear infinite;
}

@keyframes eh-spin { to { transform: rotate(360deg); } }

/* Erreur */
.eh-alert {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(197, 48, 48, .3);
    border-radius: var(--eh-radius);
    background: rgba(197, 48, 48, .06);
    color: var(--eh-danger);
    font-size: 14px;
}

.eh-alert[hidden] { display: none; }

/* Encadré d'information */
.eh-info {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    background: var(--eh-surface);
}

.eh-info > .bi { flex: none; color: var(--eh-accent); font-size: 20px; }
.eh-info strong { display: block; font-size: 14px; }
.eh-info p { margin: 4px 0 0; color: var(--eh-muted); font-size: 13px; }

.eh-foot {
    padding: 16px;
    color: var(--eh-muted);
    font-size: 12px;
    text-align: center;
}

@media (min-width: 600px) {
    .eh-main { padding-top: 40px; }
    .eh-card { padding: 28px 26px; }
}

.eh-code::placeholder {
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* Information (code demandé) plutôt qu'erreur */
.eh-alert--info {
    border-color: rgba(31, 58, 143, .25);
    background: var(--eh-accent-soft);
    color: var(--eh-accent);
}
