/**
 * front/css/auth.css
 *
 * Compléments pour les pages « Connexion » et « Inscription ».
 * Le gros du style vient de css/presentation.css (hero, cartes, champs,
 * boutons, alertes) : ce fichier n'ajoute que ce qui est propre aux
 * formulaires d'authentification.
 */

.auth-form .field { margin-bottom: 18px; }
.auth-form .field:last-child { margin-bottom: 0; }

/* Alertes : garder les couleurs de succès/erreur à l'intérieur des cartes */
.card .form-alert p,
.card .form-alert li,
.card .form-alert strong { color: inherit; }

.form-alert.error li::before {
    background: #d1493f;
    box-shadow: 0 0 0 2px rgba(209, 73, 63, .16);
}

.form-alert.success li::before {
    background: var(--forest);
    box-shadow: 0 0 0 2px rgba(47, 125, 50, .16);
}

/* Messages d'erreur sous les champs */
.field .hint.error {
    color: #b3261e;
    font-weight: 700;
}

.field input[aria-invalid="true"] {
    border-color: #d1493f;
    background: #fdf4f3;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, .1);
}

/* Champ mot de passe + bouton « Afficher » */
.field-password { position: relative; }

.field-password input { padding-right: 106px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--forest-dark);
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.password-toggle:hover { background: #f4f8ee; border-color: #b9d3a9; }
.password-toggle[aria-pressed="true"] { background: #e8f2dd; border-color: #a9cc90; }

/* Liens sous le formulaire */
.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: baseline;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: .86rem;
}

.auth-links a { font-weight: 800; }

.auth-form .form-actions { margin-top: 22px; }

@media (max-width: 560px) {
    .auth-form .form-actions .btn { width: 100%; }
}
