/* Tikehub — Pages authentification & accès invité */
.th-page--auth {
    min-height: calc(100vh - 80px);
    background: var(--th-bg);
    padding-bottom: 3rem;
}

.th-auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 120px);
}

.th-auth-page__wrap {
    width: 100%;
    max-width: 28rem;
}

.th-auth-page__wrap--wide {
    max-width: 32rem;
}

.th-auth-page__wrap--login {
    max-width: 30rem;
}

@media (min-width: 640px) {
    .th-auth-page {
        padding: 2.5rem 1.5rem;
    }
}

.th-auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.th-auth-tabs__nav {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    gap: 0.35rem;
    padding: 0.35rem;
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: 9999px;
    box-shadow: 0 2px 12px rgba(26, 43, 72, 0.06);
}

.th-auth-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.th-auth-tab:hover {
    color: var(--th-navy);
}

.th-auth-tab.is-active {
    color: #fff;
    background: var(--th-orange);
    box-shadow: 0 2px 10px rgba(242, 145, 36, 0.35);
}

.th-auth-panel {
    display: none;
}

.th-auth-panel.is-active {
    display: block;
}

.th-auth-card {
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(26, 43, 72, 0.06);
}

@media (min-width: 640px) {
    .th-auth-card {
        padding: 2rem;
    }
}

.th-auth-card__head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.th-auth-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--th-orange) 0%, #f5a623 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(242, 145, 36, 0.35);
}

.th-auth-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--th-navy);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.th-auth-card__subtitle {
    font-size: 0.9375rem;
    color: var(--th-text-muted);
    line-height: 1.5;
}

.th-auth-card__subtitle strong {
    color: var(--th-navy);
}

.th-alert-error {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--th-radius);
    color: #991b1b;
    font-size: 0.875rem;
}

.th-alert-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

.th-form__label-icon {
    color: var(--th-orange);
    margin-right: 0.35rem;
}

.th-form__row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .th-form__row--split {
        flex-direction: row;
    }

    .th-form__row--split .th-form__group {
        flex: 1;
    }
}

.th-form__extras {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .th-form__extras {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.th-form__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    font-size: 0.875rem;
    color: var(--th-text-muted);
    cursor: pointer;
}

.th-form__checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--th-orange);
}

.th-form__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-orange);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.th-form__link:hover {
    color: var(--th-orange-hover);
}

.th-form__password-wrap {
    position: relative;
}

.th-form__password-wrap .th-form__input {
    padding-right: 2.75rem;
}

.th-form__toggle-pw {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    background: transparent;
    color: var(--th-text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s;
}

.th-form__toggle-pw:hover {
    color: var(--th-orange);
}

.th-auth-switch {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--th-text-muted);
}

.th-auth-switch button {
    border: none;
    background: none;
    font-weight: 600;
    color: var(--th-orange);
    cursor: pointer;
    min-height: 44px;
    padding: 0 0.25rem;
}

.th-auth-switch button:hover {
    color: var(--th-orange-hover);
}

.th-auth-roles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .th-auth-roles {
        grid-template-columns: repeat(2, 1fr);
    }
}

.th-auth-role {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--th-border);
    border-radius: var(--th-radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

@media (min-width: 640px) {
    .th-auth-role {
        align-items: center;
    }
}

.th-auth-role:hover {
    border-color: rgba(242, 145, 36, 0.45);
}

.th-auth-role.is-selected {
    border-color: var(--th-orange);
    background: var(--th-orange-light);
}

.th-auth-role input {
    margin-top: 0.15rem;
    accent-color: var(--th-orange);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .th-auth-role input {
        margin-top: 0;
    }
}

.th-auth-role__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--th-navy);
}

.th-auth-role__desc {
    font-size: 0.75rem;
    color: var(--th-text-muted);
}

.th-auth-help {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--th-border);
}

.th-auth-help__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--th-navy);
    margin-bottom: 0.75rem;
}

.th-auth-help__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.th-auth-help__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--th-text-muted);
    line-height: 1.5;
}

.th-auth-help__list i {
    color: var(--th-orange);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.th-form__submit--inline {
    width: 100%;
}

@media (min-width: 640px) {
    .th-form__submit--inline {
        width: auto;
        min-width: 14rem;
    }
}

.th-form__actions--center {
    text-align: center;
}
