/* Password Update Specific Styles */

/* Neutraliser les styles Keycloak et forcer le layout redesign */
body.password-update-page {
    background-color: #FFFFFF !important;
    margin: 0 !important;
}

body.password-update-page #wrapper,
body.password-update-page .login-pf-page::before,
body.password-update-page .login-pf-page::after,
body.password-update-page .bg-decor,
body.password-update-page .bottom-decor,
body.password-update-page [class*="decor"],
body.password-update-page [class*="triangle"],
body.password-update-page [class*="corner"] {
    display: none !important;
}

body.password-update-page .kc-login-page,
body.password-update-page .login-container,
body.password-update-page .login-pf-page,
body.password-update-page .login-pf-page > div {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
}

.password-update-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 48px !important;
    font-family: var(--font-quicksand) !important;
    background: #FFFFFF !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
}

.password-update-title,
.password-update-info-card,
.password-update-error-banner,
.password-update-form-card,
.password-update-btn-zone {
    width: 100%;
    max-width: 744px;
}


.password-update-info-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px !important;
    box-sizing: border-box;
}

.password-update-info-card:has(+ .password-update-error-banner) {
    margin-bottom: 48px !important;
}

.password-update-info-logo {
    width: 132px;
    height: 54px;
    display: block;
}

.password-update-info-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    color: #3A001E;
    margin: 0;
    text-align: left;
    width: 100%;
}

.password-update-rules {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-update-rule {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 20px;
    margin: 0;
    padding: 0 !important;
    color: #3A001E;
    font-family: var(--font-quicksand, 'Quicksand', sans-serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
}

.password-update-rule-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: block;
}

.password-update-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #E43C2F;

    padding: 10px 16px;
    margin-bottom: 48px !important;
    box-sizing: border-box;
    color: #3A001E;
    font-size: 14px;
    line-height: 1.3;
}

.password-update-error-messages {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    margin-top: 3px;
}

.password-update-alert-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.password-update-form-card {
    padding: 16px;
    box-sizing: border-box;
    margin-bottom: 3rem;
}

.password-update-form-card form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-update-input--error {
    border-color: #E43C2F !important;
}

.password-update-input-wrap {
    position: relative;
    width: 100%;
}

.password-update-toggle-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.password-update-eye-icon {
    width: 24px;
    height: 24px;
}

.password-update-btn-zone {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-update-btn-zone .prd-cancel {
    width: 100%;
    height: 44px;
    background: #F9F9F9;
    color: #3A001E;
    border: 1px solid #FC8A76;
    border-radius: 32px;
    padding: 0 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-quicksand, 'Quicksand', sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 2px 2px 5px #D9D9D9;
    transition: background-color 0.2s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
}

.password-update-btn-zone .prd-cancel:hover,
.password-update-btn-zone .prd-cancel:focus {
    background: #EEEEEE;
    outline: none;
    text-decoration: none;
}


/* --- Restauration des styles de layout supprimés par erreur --- */
.password-update-logo {
    margin: 0 0 36px 0;
    align-self: flex-start;
    line-height: 0;
}

.password-update-logo img {
    width: 132px;
    height: 54px;
}

.password-update-title {
    font-size: 40px;
    font-weight: 700;
    color: #3A001E;
    line-height: 100%;
    margin: 0 0 24px 0;
}

.password-update-info-card {
    background: #ffffff;
    border: 1px solid #FFFAF7;
    border-radius: 8px;
    box-shadow: 2px 2px 10px 5px #F8F1ED;
}

.password-update-form-card {
    background: #fff;
    border: 1px solid #FFFAF7;
    border-radius: 8px;
    box-shadow: 2px 2px 10px 5px #F8F1ED;
}

.password-update-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #E43C2F;
    border-radius: 8px;
    box-shadow: 2px 2px 10px 5px #F8F1ED;
    padding: 10px 16px;
    margin-bottom: 48px !important;
    box-sizing: border-box;
    color: #3A001E;
    font-size: 14px;
    line-height: 1.3;
}

.password-success-inner {
    width: 100%;
    max-width: 744px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.password-update-success-title {
    margin: 0;
    width: 100%;
    height: 100px;
}

.password-update-success-card {
    background: #ffffff;
    border: 1px solid #FFFAF7;
    border-radius: 8px;
    box-shadow: 2px 2px 10px 5px #F8F1ED;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.password-update-success-card img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.password-update-success-btn-zone {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.password-update-success-btn-zone .sso-btn-primary {
    background: #fc8a76;
    color: #3a001e;
    font-family: var(--font-quicksand), "Quicksand", sans-serif;
    font-weight: 700;
    font-size: 18px;
    padding: 16px;
    border-radius: 32px;
    box-shadow: 2px 2px 5px #d9d9d9;
    width: 100%;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
}

.password-update-success-btn-zone .sso-btn-primary:hover {
    opacity: 0.9;
}

.password-update-btn-zone .sso-btn-primary {
    box-shadow: 2px 2px 10px 0 #D9D9D9;
}

.password-update-btn-zone .sso-btn-primary:disabled,
.password-update-btn-zone .sso-btn-primary.is-loading {
    background: #FC8A76 !important;
    background-color: #FC8A76 !important;
    color: #3A001E !important;
    cursor: default;
    opacity: 0.5;
}

body.password-update-page .password-update-btn-zone #kc-login.is-loading {
    cursor: wait;
}

.password-update-btn-zone .sso-btn-primary.is-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    margin-left: 8px;
    border: 2px solid #695B62;
    border-top-color: transparent;
    border-radius: 50%;
    box-sizing: border-box;
    animation: password-update-spin 0.8s linear infinite;
}

@keyframes password-update-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    .password-update-container {
        align-items: flex-start !important;
        padding: 24px !important;
    }

    .password-update-logo {
        margin-left: 0;
        margin-bottom: 24px;
    }

    .password-update-logo img {
        width: 132px;
        height: 54px;
    }

    .password-update-title,
    .password-update-success-title {
        font-size: 24px;
        line-height: 125%;
        max-width: none;
        margin-bottom: 24px;
    }

    .password-update-info-card,
    .password-update-error-banner,
    .password-update-form-card,
    .password-update-btn-zone {
        max-width: none;
    }

    .password-update-info-card,
    .password-update-info-card:has(+ .password-update-error-banner),
    .password-update-error-banner {
        margin-bottom: 24px !important;
    }

    .password-update-info-text {
        line-height: 125%;
    }

    .password-success-inner {
        width: 100%;
        gap: 16px;
    }
}
