.auth-card {
    position: relative;
    box-sizing: border-box;
    width: 340px;
    max-width: calc(100% - 32px);
    margin-top: 60px;
    padding: 24px 28px;
    background: white;
    border: 1px solid var(--bleu-clair);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Always back to index: profile.html would just send a logged-out user here again */
.auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--bleu);
    font-size: 18px;
    text-decoration: none;
}

.auth-close:hover {
    background: rgb(from var(--bleu-clair) r g b / 15%);
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-card form.hidden {
    display: none;
}

.auth-card h2 {
    margin: 0 0 4px;
    text-align: center;
    color: var(--bleu-clair);
}

.auth-card input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--bleu-clair);
}

.password-field {
    position: relative;
}

/* Room on the right for the eye button */
.auth-card .password-field input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    color: #777;
    font-size: 15px;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--bleu-clair);
}

.auth-submit {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--bleu-clair);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit:hover {
    background-color: rgb(from var(--bleu-clair) r g b / 80%);
}

.auth-error,
.auth-success {
    margin: 0;
    font-size: 14px;
}

.auth-error {
    color: #f44336;
}

.auth-success {
    color: #2e7d32;
}

.auth-switch {
    margin: 4px 0 0;
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: var(--bleu);
    font-weight: 700;
}
