:root {
    --form-height: 44px;
}

.signup-hero {
    min-height: calc(100vh - var(--header-height));

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 50px 24px 32px;
}

.signup-container {

    width: 100%;
    max-width: 480px;

    display: flex;
    flex-direction: column;
    overflow: visible;

}

.signup-step {
    width: 100%;
    max-width: 480px;

    position: relative;

    display: flex;
    flex-direction: column;;

    background: var(--background);

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.signup-header {

    margin-bottom: 50px;

}

.form-field {
    position: relative;

    width: 100%;

    margin: 0;
    padding: 0;
    margin-bottom: 16px;
    gap: 8px;

    display: flex;
    flex-direction: column;

    border-radius: var(--radius-md);

    transition:
        border-color .2s ease,
        border-width .2s ease;
}

.form-input {
    height: var(--form-height);
    width: 100%;

    font-size: 13px;
    font-weight: 400;

    padding: var(--button-padding-y) var(--button-padding-x);

    padding-right: 52px;

    background: var(--component-1);

    border-radius: var(--radius-md);

    box-shadow: inset 0 0 0 1px var(--separator);

    caret-color: var(--accent);

    color: var(--text);

    outline: none;

    transition: box-shadow .2s ease;
}

.form-input::placeholder {
    font-size: 15px;
    font-weight: 500;
}

.form-input:focus {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.form-input.error {

    box-shadow: inset 0 0 0 2px var(--error);

}

.button {
    height: var(--form-height);
    width: 100%;
}


.signup-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-bottom: 30px;

    width: 100%;
}

.signup-progress-lines {
    display: flex;
    gap: 8px;

    width: 100%;
}


.signup-progress-line {
    position: relative;
    overflow: hidden;

    flex: 1;
    height: 4px;

    border-radius: 999px;
    background: var(--component-3);
}

.signup-progress-line::after {
    content: "";

    position: absolute;
    inset: 0;

    background: var(--accent);

    transform-origin: left;
    transform: scaleX(0);

    opacity: 0;
}

.signup-progress-line.active::after {
    animation: progressLoop 3s ease-in-out infinite;
}

.signup-progress-line.completed::after {
    opacity: 1;
    transform: scaleX(1);
}

.signup-form {

    display: flex;
    flex-direction: column;
    gap: 0px;

}

.message-alert-wrapper {

    margin-top: 20px;

}

.signup-progress-line.clickable {
    cursor: pointer;
}

.password-toggle {

    position: absolute;

    top: 50%;
    right: 8px;

    transform: translateY(-18%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: var(--text-secondary);

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;

}

.signup-step-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 500;

    background: none;
    border: none;
    padding: 0;

    color: var(--text-60);
}

.signup-step-indicator[hidden] {
    display: none !important;
}

.signup-step-icon {
    width: 14px;
    height: 14px;
    
}

.password-toggle svg {
    width: 20px;
    height: 20px;

    color: var(--text);

    display: block;
    flex-shrink: 0;
}

.password-rules-card {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 16px;

    background: var(--component-1);
    border-radius: var(--radius-md);

    opacity: 0;
    transform: translateY(-8px);

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.password-card-wrapper {
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;

    transition:
        max-height .35s ease,
        margin-bottom .35s ease;
}

.password-card-wrapper.show {
    max-height: 500px;
    margin-bottom: 16px;
}

.password-card-wrapper.show .password-rules-card {
    opacity: 1;
    transform: translateY(0);
}

.password-rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 25px;
}

.password-rules-title {
    font-size: 16px;
    font-weight: 400;

    color: var(--text);
}

.password-strength {
    font-size: 16px;
    font-weight: 400;

    color: var(--text);

    transition: color 0.2s ease;
}

.password-strength.too-weak {
    color: var(--error);
}

.password-strength.weak {
    color: var(--orange);
}

.password-strength.medium {
    color: var(--yellow);
}

.password-strength.strong {
    color: var(--success);
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 16px;
    font-weight: 400;

    color: var(--text);
}

.password-rule-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    flex-shrink: 0;

    color: var(--text-60);
}

.password-rule.completed {
    color: var(--success);
}

.password-rule.completed .password-rule-icon {
    color: var(--success);
}

.password-rule-icon.animate {
    animation: password-rule-pop 0.2s ease;
}

.form-select {

    width: 100%;
    height: var(--form-height);

    padding: 0 16px;
    
    border: none;
    outline: none;

    font-size: 13px;
    font-weight: 400;

    box-shadow: inset 0 0 0 1px var(--separator);

    border-radius: var(--radius-md);

    background: var(--component-1);
    color: var(--text-primary);

    font: inherit;
    cursor: pointer;

    appearance: none;

    width: 100%;

    padding-right: 52px;

    transition: .2s ease;

}

.select-wrapper {

    position: relative;

}

.select-icon {

    position: absolute;

    top: 50%;
    right: 16px;

    transform: translateY(-25%);

    color: var(--text);

    width: 14px;
    height: 14px;

    pointer-events: none;

}

.form-select:focus {

    box-shadow: inset 0 0 0 2px var(--accent);

}

.form-select,
.form-select option {

    font-size: 13px;
    font-weight: 400;

}

.form-select:invalid {

    color: var(--text-50);

}

.signup-legal {

    margin: 20px 0 16px;

    text-align: center;

    font-size: 12px;
    line-height: 1.5;

    color: var(--text-50);

}

.signup-legal a {

    color: var(--accent);

    text-decoration: none;
    font-weight: 500;

}

.form-label {

    font-size: 13px;
    font-weight: 400;

    color: var(--text-50);

}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {

    -webkit-appearance: none;
    margin: 0;

}

input[type="number"] {

    appearance: textfield;

}

.number-input-wrapper {

    position: relative;

}

.number-input {

    padding-right: 48px;

}

.number-button {

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    padding-right: 13px;

    border: none;
    background: transparent;

    color: var(--text);

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;

}

.number-button svg {

    width: 14px;
    height: 14px;

}

.number-controls {

    position: absolute;

    top: 0;
    right: 0;

    width: 40px;
    height: 100%;

    display: flex;
    flex-direction: column;
    padding: 4px 0;

    border-left: 1px solid var(--separator);

}

.signup-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 28px 0;
}

.signup-divider::before,
.signup-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--separator);
}

.signup-divider span {
    color: var(--separator);
    font-size: 13px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-button {
    width: 52px;
    height: 52px;
    border: 1px solid var(--separator);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
}

.social-button img {
    width: 24px;
    height: 24px;
}

@keyframes password-rule-pop {

    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.25);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }

}

@keyframes progressLoop {

    /* Départ */
    0% {
        transform: scaleX(0);
        opacity: 1;
    }

    /* Remplissage (≈1 seconde) */
    35% {
        transform: scaleX(1);
        opacity: 1;
    }

    /* Pause */
    70% {
        transform: scaleX(1);
        opacity: 1;
    }

    /* Dissolve */
    90% {
        transform: scaleX(1);
        opacity: 0;
    }

    /* Reset invisible */
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}