/* Double authentification — page de connexion, Mon profil, bandeau de l'application. */

/* Les étapes s'affichent une à la fois : `hidden` doit gagner sur les display des formulaires. */
.lg-card [hidden],
#twofaPanel [hidden] { display: none !important; }

.tf-lead { margin: 0 0 0.75rem; color: var(--il-ink-1, #1d2b36); line-height: 1.5; }
.tf-hint { margin: 0.35rem 0 0.75rem; font-size: 0.85rem; color: var(--il-ink-3, #5d7385); line-height: 1.45; }
.tf-msg { margin: 0.6rem 0 0; font-size: 0.88rem; font-weight: 600; color: var(--il-ok, #15803d); min-height: 1.2em; }
.tf-msg.is-bad { color: var(--il-bad, #b91c1c); }

.tf-code {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.25em;
    font-size: 1.15rem;
}

.tf-steps { margin: 0 0 1rem; padding-left: 1.25rem; line-height: 1.55; color: var(--il-ink-1, #1d2b36); }
.tf-steps li { margin-bottom: 0.6rem; }

.tf-qr { margin: 0.6rem 0; }
.tf-qr-svg {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--il-border, #d5e1ea);
    background: #ffffff;
}

.tf-manual { margin-top: 0.35rem; font-size: 0.85rem; }
.tf-manual summary { cursor: pointer; color: var(--il-action, #23a6ec); }
.tf-secret {
    display: block;
    margin-top: 0.35rem;
    padding: 0.4rem 0.6rem;
    word-break: break-all;
    font-size: 0.85rem;
    border-radius: 6px;
    background: var(--il-sunken, #eef3f6);
    user-select: all;
}

.tf-field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0.5rem 0 0.75rem; font-weight: 600; font-size: 0.88rem; }
.tf-field input {
    max-width: 220px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--il-border, #d5e1ea);
    border-radius: 8px;
    background: var(--il-canvas, #ffffff);
    color: var(--il-ink-1, #1d2b36);
}

.tf-recovery {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #f2c48d;
    border-radius: 10px;
    background: #fff7ec;
    color: #5b3d14;
}
.tf-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
    margin: 0.5rem 0 0.9rem;
    padding: 0;
    list-style: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem;
    user-select: all;
}

.tf-panel { margin-top: 1.5rem; }

/* Bandeau dans l'application pendant le délai de grâce */
.tf-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid #f2c48d;
    border-radius: 10px;
    background: #fff7ec;
    color: #5b3d14;
    font-size: 0.9rem;
}
.tf-banner a { color: #7a4a0c; font-weight: 700; }

[data-theme="dark"] .tf-recovery,
[data-theme="dark"] .tf-banner { background: #3a2a12; border-color: #7a5a2a; color: #f6e2c2; }
[data-theme="dark"] .tf-banner a { color: #ffd59a; }

/* Appareil de confiance (30 jours) — case à la connexion */
.tf-trust {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.25rem 0 0.9rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--il-ink-1, #1d2b36);
    cursor: pointer;
}
.tf-trust input { width: 18px; height: 18px; margin: 0.1rem 0 0; flex: 0 0 auto; accent-color: var(--il-action, #23a6ec); }
.tf-trust small { display: block; margin-top: 0.15rem; font-size: 0.8rem; color: var(--il-ink-3, #5d7385); }

/* Mon profil — liste des appareils de confiance */
.tf-devices { margin-top: 1.25rem; }
.tf-sub { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 700; color: var(--il-ink-1, #1d2b36); }
.tf-device-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.tf-device {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--il-border, #d5e1ea);
}
.tf-device:last-child { border-bottom: 0; }
.tf-device-name { font-weight: 600; color: var(--il-ink-1, #1d2b36); }
.tf-device-meta { display: block; font-size: 0.8rem; color: var(--il-ink-3, #5d7385); }
.tf-device-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--il-sunken, #eef3f6);
    color: var(--il-ink-2, #33495a);
}

/* Code par e-mail (joueurs/agents) : « renvoyer » et « utiliser une application » sous le bouton. */
.tf-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 0.75rem; }
.tf-alt .tf-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; margin: 0; }
