/* static/css/accounts/auth.css */

/* WRAPPER */
.auth-wrapper {
    width: 92%;
    max-width: 480px;
    margin: 90px auto;
}

/* CARD */
.auth-card {
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    animation: fadeUp .4s ease both;
}

/* TITLES */
.auth-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.auth-subtitle {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 30px;
}

/* FORM */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-group label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.auth-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 1rem;
    background: #fafafa;
    transition: border .25s ease;
}

.auth-group input:focus {
    border-color: #000;
    outline: none;
}

.auth-btn {
    text-align: center;
    width: 100%;
}

/* SWITCH LINK */
.auth-switch {
    margin-top: 18px;
    font-size: .95rem;
}

.auth-switch a {
    font-weight: 600;
    color: #000;
}

/* MESSAGES */
.auth-messages {
    margin-bottom: 22px;
}

.auth-msg {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: .95rem;
}

.auth-msg.success { background: #d8f6dd; color: #0d6d28; }
.auth-msg.error   { background: #f6d4d7; color: #8c1d2f; }
.auth-msg.info    { background: #d9e7ff; color: #184aaa; }

/* ANIM */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* RESPONSIVE */
@media (max-width: 480px) {
    .auth-card { padding: 30px; }
    .auth-title { font-size: 1.6rem; }
}

/* PASSWORD FIELD */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.eye {
    width: 22px;
    height: 22px;
    display: block;
    border-radius: 3px;
    background: url("/static/images/eye-off.svg") center/cover no-repeat;
    transition: opacity .25s ease;
}

.toggle-password.active .eye {
    background: url("/static/images/eye-on.svg") center/cover no-repeat;
}

/* ERROR SHAKE ANIMATION */
.auth-error-animate {
    animation: shake .35s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* INPUT INVALID */
input.input-invalid {
    border-color: #d62828 !important;
    background: #ffe8e8;
}


/* PASSWORD STRENGTH METER */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Password strength colors */
.strength-weak .strength-fill {
    background: #d63031;
    width: 33%;
}

.strength-medium .strength-fill {
    background: #fdcb6e;
    width: 66%;
}

.strength-strong .strength-fill {
    background: #00b894;
    width: 100%;
}

.strength-weak .strength-text {
    color: #d63031;
}

.strength-medium .strength-text {
    color: #fdcb6e;
}

.strength-strong .strength-text {
    color: #00b894;
}

/* PASSWORD MATCH INDICATOR */
.password-match {
    margin-top: 8px;
}

.match-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.match-valid {
    color: #00b894;
}

.match-invalid {
    color: #d63031;
}

.match-empty {
    color: #666;
}

/* CHECKBOX GROUP (CGU/DPA) */
.auth-checkbox-group {
    margin-top: 5px;
}

.auth-checkbox-group .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.auth-checkbox-group input[type="checkbox"] {
    width: auto;
    min-width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #000;
}

.auth-checkbox-group .checkbox-text {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
}

.auth-checkbox-group .checkbox-text a {
    color: #000;
    font-weight: 600;
    text-decoration: underline;
}

.auth-checkbox-group .checkbox-text a:hover {
    text-decoration: none;
}