/*
 * Pont d'intégration Symfony du parcours de connexion Jalon 06.
 * La cascade visuelle canonique reste celle du prototype ; cette règle rend
 * explicite l'état initial réel avant que login.js n'ouvre l'étape mot de passe.
 */
body[data-screen="login"] .login-password-stage[hidden] {
    display: none !important;
}

/* Le contrôle reprend le geste V1 : le mot de passe n'est révélé que pendant
 * l'appui. Le bouton reste un vrai contrôle clavier et tactile. */
body[data-screen="login"] .login-password-field {
    position: relative;
}

body[data-screen="login"] .login-password-field .input {
    padding-inline-end: 3.75rem;
}

body[data-screen="login"] .password-reveal {
    position: absolute;
    z-index: 1;
    inset: 0 0 0 auto;
    display: grid;
    width: 3.75rem;
    min-height: 3.75rem;
    padding: 0;
    border: 0;
    border-radius: 0 0.3125rem 0.3125rem 0;
    place-items: center;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    opacity: 0.62;
    touch-action: manipulation;
    transition: color var(--v1-fold), opacity var(--v1-motion), background-color var(--v1-motion);
}

body[data-screen="login"] .password-reveal .icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

body[data-screen="login"] .password-reveal:hover,
body[data-screen="login"] .password-reveal:focus-visible,
body[data-screen="login"] .password-reveal[aria-pressed="true"] {
    color: var(--color-accent-hover);
    opacity: 1;
}

body[data-screen="login"] .password-reveal:focus-visible {
    outline: 2px solid var(--color-accent-hover);
    outline-offset: -3px;
}

/*
 * Parcours de validation : même coque J06 que la connexion, avec des rôles
 * sémantiques afin qu'un thème futur puisse remplacer son apparence.
 */
.identity-card--verification,
.identity-card--recovery,
.identity-card--invitation,
.identity-card--error {
    gap: var(--space-6);
}

.identity-card__content {
    display: grid;
    gap: var(--space-3);
    text-align: center;
}

.identity-card__title {
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-xl);
    line-height: 1.2;
}

.identity-card__copy,
.identity-card__hint {
    margin: 0;
    color: var(--color-text-secondary);
    font-family: var(--font-copy);
    font-size: var(--text-sm);
}

.identity-card__hint {
    color: var(--color-text-muted);
    text-align: center;
}

.identity-resend-status {
    margin: 0;
    color: var(--color-text-secondary);
    font-family: var(--font-copy);
    font-size: var(--text-sm);
    line-height: 1.45;
    text-align: center;
}

/* Le dialogue J06 est une surface claire : son statut reprend son rôle de
 * premier plan au lieu du texte secondaire prévu pour le canvas sombre. */
#forgot-dialog .identity-resend-status {
    color: inherit;
}

/* Le retour compact reprend la géométrie J06 de l'étape mot de passe et
 * réserve le reste de la ligne à l'action principale, y compris sur mobile. */
.identity-recovery-actions {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    max-height: none;
    overflow: visible;
}

.identity-recovery-actions .login-back {
    align-self: center;
}

.identity-recovery-actions [data-recovery-submit] {
    min-width: 0;
    padding-inline: clamp(var(--space-2), 3vw, 0.9375rem);
    font-size: clamp(var(--text-md), 4.65vw, 1.25rem);
}

.identity-card__form,
.identity-card__actions {
    display: grid;
    gap: var(--space-3);
}

.identity-card__actions .button {
    justify-content: center;
    width: 100%;
}
