/* Auth — formulaire carte (charte Hub SanDiCom via variables :root) */

.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--ul-green, #00953e);
}

.auth-page main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.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 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(24px, 5vh, 48px) clamp(16px, 4vw, 24px) !important;
}

@media screen and (max-width: 991px) {
    .auth-page .auth-breadcrumb.ul-breadcrumb {
        padding: clamp(20px, 4vh, 40px) clamp(16px, 4vw, 20px) !important;
        background-position: center center;
    }
}

.auth-messages {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 0 16px;
    flex-shrink: 0;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 0;
    position: relative;
    z-index: 2;
}

.auth-main__inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 24px);
}

.auth-main__inner--wide {
    max-width: 720px;
}

.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__logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.auth-card__logo-link:hover {
    opacity: 0.85;
}

.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:not([type="radio"]):not([type="checkbox"]) {
    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="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 18px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border: 2px solid var(--ul-green, #00953e) !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    cursor: pointer;
    accent-color: var(--ul-green, #00953e);
}

.auth-page .auth-form.ul-form input[type="checkbox"]:checked {
    background-color: var(--ul-green, #00953e) !important;
    border-color: var(--ul-green, #00953e) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

.auth-register-row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0;
}

.auth-register-row > [class*="col-"] .form-group {
    margin-bottom: 12px;
}

.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-terms-group {
    margin: 8px 0 4px;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ul-gray);
    margin: 0;
    cursor: pointer;
}

.auth-terms input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--ul-green);
}

.auth-terms a {
    color: var(--ul-primary);
    text-decoration: underline;
}

.auth-terms a:hover {
    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-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ul-gray);
    text-align: left;
    line-height: 1.4;
}

.auth-field-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ul-heading, #1a2420);
    text-align: left;
}

.auth-optional {
    font-weight: 400;
    color: var(--ul-gray);
    font-size: 12px;
}

.auth-form-control--date {
    color-scheme: light;
}

.auth-sexe-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.auth-sexe-row__label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ul-heading, #1a2420);
    flex-shrink: 0;
}

.auth-radio-group--inline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    flex-wrap: nowrap;
}

.auth-radio--compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--ul-gray);
    position: relative;
}

.auth-radio--compact .auth-radio-input {
    position: absolute;
    opacity: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex: none;
    min-width: 0;
    cursor: pointer;
    z-index: 1;
}

.auth-radio__dot {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid #c5cfc8;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    pointer-events: none;
}

.auth-radio--compact:has(.auth-radio-input:checked) .auth-radio__dot {
    border-color: var(--ul-green);
    background: radial-gradient(circle, var(--ul-green) 40%, transparent 41%);
}

.auth-radio--compact:has(.auth-radio-input:checked) .auth-radio__label {
    color: var(--ul-heading, #1a2420);
    font-weight: 600;
}

.auth-radio--compact:has(.auth-radio-input:focus-visible) .auth-radio__dot {
    outline: 2px solid var(--ul-green);
    outline-offset: 2px;
}

.auth-radio__label {
    line-height: 1.2;
    user-select: none;
    white-space: nowrap;
}

.auth-field-error--full {
    flex: 0 0 100%;
    margin-top: 4px;
}

.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.is-loading,
.auth-submit:disabled {
    cursor: wait;
    opacity: 0.92;
    pointer-events: none;
}

.auth-submit.is-loading .auth-submit__icon {
    left: calc(100% - 50px);
}

.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);
}

/* Connexion sociale (Google, Facebook, Apple) — masquée tant que non branchée
.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);
}

/* OTP — 6 cases horizontales (réinitialisation mot de passe) */
.auth-otp-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 8px auto 20px;
    padding: 0;
}

.auth-otp-errors {
    text-align: center;
    margin: -8px 0 16px;
}

.auth-otp-errors .auth-field-error {
    margin: 0;
}

/* Surcharge .ul-form input (width:100% sinon cases empilées) */
.auth-page .auth-form.ul-form .auth-otp-input {
    display: block;
    flex: 0 0 auto !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    line-height: 58px;
    letter-spacing: 0;
    color: var(--ul-black) !important;
    -webkit-text-fill-color: var(--ul-black);
    background-color: var(--white) !important;
    border: 2px solid var(--ul-gray2) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .auth-form.ul-form .auth-otp-input:focus {
    outline: none;
    border-color: var(--ul-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 151, 52, 0.18) !important;
}

.auth-page .auth-form.ul-form .auth-otp-input::placeholder {
    color: transparent;
}

/* Résultat (vérification email, erreurs formulaire) */
.auth-result-wrap {
    text-align: center;
}

.auth-result-icon {
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
}

.auth-result-icon--success {
    color: var(--ul-green);
}

.auth-result-icon--error {
    color: #dc3545;
}

.auth-result {
    text-align: left;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-result__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.auth-result p {
    margin: 0;
}

.auth-result--success {
    border: 1px solid rgba(0, 151, 52, 0.35);
    background: rgba(234, 247, 237, 0.95);
    color: var(--ul-green);
}

.auth-result--error {
    border: 1px solid rgba(253, 52, 26, 0.35);
    background: rgba(255, 248, 246, 0.95);
    color: #b91c1c;
}

.auth-submit--link {
    display: flex;
    text-decoration: none;
    margin-bottom: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 575px) {
    .auth-card {
        border-radius: 20px;
        padding: 24px 20px 28px;
    }

    .auth-page .auth-form.ul-form .auth-otp-input {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 50px !important;
        line-height: 50px;
        font-size: 22px;
    }

    .auth-otp-row {
        gap: 8px;
    }
}

.preloader-logo {
    max-height: 64px;
    width: auto;
    max-width: min(220px, 72vw);
    object-fit: contain;
}
