/* Auth — formulaire carte (charte Alliance Hub via variables :root) */

.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-page main {
    flex: 0 0 auto;
}

.auth-page .ul-footer {
    flex-shrink: 0;
    margin-top: 0;
}

.auth-page .ul-search-form-wrapper {
    display: none !important;
}

.auth-page .ul-breadcrumb-title {
    display: none;
}

.auth-page .auth-breadcrumb.ul-breadcrumb {
    padding: clamp(28px, 4vw, 48px) 0 clamp(20px, 2.5vw, 32px) !important;
}

@media screen and (max-width: 991px) {
    .auth-page .auth-breadcrumb.ul-breadcrumb {
        padding: clamp(32px, 5vw, 48px) 0 clamp(20px, 2.5vw, 32px) !important;
    }
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(16px, 3vw, 24px) 0;
    position: relative;
    z-index: 2;
}

.auth-main__inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-card {
    width: 100%;
    padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 32px) clamp(24px, 3vw, 28px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        inset 0 0 0 999px rgba(255, 255, 255, 0.97),
        var(--ul-shadow-brand);
    backdrop-filter: blur(12px);
}

.auth-card__icon-top {
    width: auto;
    max-width: 200px;
    height: auto;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
}

.auth-card__icon-top .logo {
    max-width: clamp(140px, 40vw, 180px);
    height: auto;
    display: block;
}

.auth-card__title {
    font-size: clamp(1.35rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--ul-black);
    text-align: center;
    margin: 0 0 10px;
    line-height: 1.25;
}

.auth-card__subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ul-gray);
    text-align: center;
    margin: 0 auto 28px;
    max-width: 320px;
}

.auth-form .form-group {
    margin-bottom: 12px;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border-radius: 10px;
    border: 1px solid var(--ul-gray2);
    box-shadow: inset 0 0 0 48px var(--ul-gray3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field:focus-within {
    border-color: var(--ul-secondary);
    box-shadow:
        inset 0 0 0 48px var(--white),
        0 0 0 3px rgba(134, 199, 31, 0.28);
}

.auth-field__icon {
    flex-shrink: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ul-green);
    font-size: 16px;
}

.auth-field__icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.auth-page .auth-form.ul-form input {
    flex: 1;
    width: 100%;
    height: 48px;
    border: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    padding: 0 12px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ul-black) !important;
    -webkit-text-fill-color: var(--ul-black);
    outline: none;
    min-width: 0;
    box-shadow: none !important;
    border-radius: 0;
}

.auth-page .auth-form.ul-form input[type="password"],
.auth-page .auth-form.ul-form input[type="text"]#auth-password {
    letter-spacing: 0.02em;
}

.auth-field input::placeholder {
    color: var(--ul-gray);
}

.auth-field__toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    color: var(--ul-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    z-index: 2;
    border-radius: 8px;
    transition: color 0.2s ease, transform 0.15s ease;
}

.auth-field__toggle:hover {
    color: var(--ul-primary);
}

.auth-field__toggle:active {
    transform: scale(0.94);
}

.auth-field__toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.auth-field__toggle .icon-eye-off {
    display: none;
}

.auth-field__toggle.is-visible .icon-eye-open {
    display: none;
}

.auth-field__toggle.is-visible .icon-eye-off {
    display: block;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 20px;
    flex-wrap: wrap;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ul-gray);
    margin: 0;
    cursor: pointer;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--ul-green);
}

.auth-forgot {
    font-size: 13px;
    color: var(--ul-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot:hover {
    color: var(--ul-primary);
}

.auth-field--error {
    border-color: var(--ul-primary) !important;
}

.auth-field-error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ul-primary);
    text-align: left;
}

.auth-messages {
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 0 16px;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.auth-alert--success {
    border-color: rgba(0, 151, 52, 0.35);
    box-shadow: inset 0 0 0 999px rgba(234, 247, 237, 0.95);
    color: var(--ul-green);
}

.auth-alert--error {
    border-color: rgba(253, 52, 26, 0.35);
    box-shadow: inset 0 0 0 999px rgba(255, 248, 246, 0.95);
    color: #b91c1c;
}

.auth-alert--warning {
    border-color: rgba(134, 199, 31, 0.45);
    box-shadow: inset 0 0 0 999px rgba(248, 252, 238, 0.95);
    color: #4d7c0f;
}

.auth-alert--info {
    border-color: var(--ul-gray2);
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.95);
    color: var(--ul-p);
}

.auth-card-footer {
    text-align: center;
    font-size: 14px;
    color: var(--ul-gray);
    margin: 0 0 20px;
}

.auth-card-footer a {
    color: var(--ul-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-card-footer a:hover {
    color: var(--ul-primary);
}

/* Bouton — rouge primaire, icône glisse gauche → droite */
.auth-submit {
    width: 100%;
    height: 52px;
    border: 2px solid var(--ul-green);
    border-radius: 14px;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 52px;
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 52px var(--ul-green);
    transition: transform 0.15s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-submit:hover {
    border-color: var(--ul-secondary);
    box-shadow: inset 0 0 0 52px var(--ul-secondary);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-submit__label {
    position: relative;
    z-index: 1;
}

.auth-submit__icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--white);
    font-size: 12px;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.auth-submit.is-icon-animating .auth-submit__icon {
    left: calc(100% - 50px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--ul-gray);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 0;
    border-top: 1px dashed var(--ul-gray2);
}

.auth-divider span {
    white-space: nowrap;
}

.auth-social {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.auth-social__btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--ul-gray2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ul-p);
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.auth-social__btn:hover {
    border-color: var(--ul-secondary);
    box-shadow: 0 4px 14px rgba(134, 199, 31, 0.25);
    transform: translateY(-2px);
    color: var(--ul-green);
}

.auth-social__btn svg {
    width: 22px;
    height: 22px;
}

.auth-page .ul-footer-middle {
    padding-top: clamp(16px, 2vw, 24px);
    padding-bottom: clamp(16px, 2vw, 24px);
}

.auth-page .ul-footer-widget-title::before {
    background-color: var(--ul-primary);
}

.auth-page .ul-footer-widget-title::after {
    background-color: var(--ul-secondary);
}

@media (max-width: 575px) {
    .auth-card {
        border-radius: 20px;
        padding: 24px 20px 28px;
    }
}
