/* Aubaine — Portail d'authentification */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Rethink+Sans:ital,wght@0,400;0,600;0,700&display=swap');

.auth-portal-page {
    --ap-bg: #f4f6fb;
    --ap-surface: #ffffff;
    --ap-surface-2: #f8fafc;
    --ap-text: #0f172a;
    --ap-text-2: #64748b;
    --ap-text-3: #94a3b8;
    --ap-border: #e2e8f0;
    --ap-border-2: #cbd5e1;
    --ap-radius-xl: 24px;
    --ap-radius-md: 12px;
    --ap-client: #0f6e56;
    --ap-client-light: #1d9e75;
    --ap-client-pill-bg: #eaf3de;
    --ap-client-pill-text: #27500a;
    --ap-client-icon-border: #9fe1cb;
    --ap-team: #3c3489;
    --ap-team-light: #534ab7;
    --ap-team-pill-bg: #eeedfe;
    --ap-team-pill-text: #3c3489;
    --ap-team-icon-border: #afa9ec;
    --ap-accent: var(--ap-client);
    --ap-accent-light: var(--ap-client-light);
    --ap-hero-gradient: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 45%, #f8fafc 100%);

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--ap-hero-gradient);
    font-family: 'DM Sans', sans-serif;
}

.auth-portal-page--team {
    --ap-accent: var(--ap-team);
    --ap-accent-light: var(--ap-team-light);
    --ap-hero-gradient: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 45%, #f8fafc 100%);
}

.auth-portal-back {
    position: fixed;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ap-text-2);
    text-decoration: none;
    font-weight: 500;
    z-index: 5;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.auth-portal-back:hover {
    color: var(--ap-accent-light);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(260px, 320px);
    gap: 0;
    width: 100%;
    max-width: 920px;
    min-height: 580px;
    border-radius: var(--ap-radius-xl);
    overflow: hidden;
    border: 1px solid var(--ap-border);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    background: var(--ap-surface);
}

.auth-shell--compact {
    grid-template-columns: minmax(0, 480px);
    max-width: 480px;
    min-height: auto;
}

.auth-card {
    padding: 40px 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.auth-card__brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card__logo {
    height: 48px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: inline-block;
}

.auth-card__tagline {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--ap-text-2);
    letter-spacing: 0.02em;
}

.auth-card__divider {
    height: 1px;
    background: var(--ap-border);
    margin: 22px 0 16px;
}

.auth-card__crosslink {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    text-align: center;
    font-size: 12px;
    color: var(--ap-text-3);
}

.auth-card__crosslink a {
    color: var(--ap-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-card__crosslink a:hover {
    text-decoration: underline;
}

.auth-side-panel {
    background: var(--ap-surface-2);
    border-left: 1px solid var(--ap-border);
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.auth-side-panel__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ap-border);
    color: var(--ap-accent);
    font-size: 26px;
}

.auth-side-panel__title {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ap-text);
    margin: 0;
    line-height: 1.2;
}

.auth-side-panel__text {
    font-size: 13px;
    line-height: 1.65;
    color: var(--ap-text-2);
    margin: 0;
}

.auth-side-panel__features {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-side-panel__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ap-text);
    font-weight: 500;
}

.auth-side-panel__features i {
    color: var(--ap-accent);
    font-size: 18px;
}

.auth-register-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ap-surface-2);
    border: 1px solid var(--ap-border);
    color: var(--ap-accent);
    font-size: 30px;
}

.auth-passkey-manage {
    font-size: 11px;
    color: var(--ap-text-3);
    text-align: center;
    margin-top: 8px;
}

.auth-passkey-manage a {
    color: var(--ap-team-light);
    text-decoration: none;
}

.auth-passkey-manage a:hover {
    text-decoration: underline;
}

/* Legacy layout aliases kept for compatibility */
.auth-root {
    display: contents;
}

.auth-panel-left,
.auth-panel-right,
.auth-deco-side,
.auth-spacer,
.auth-portal-switch,
.auth-sec-footer {
    display: none !important;
}

.auth-form-side {
    display: contents;
}

.auth-portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 18px;
}

.auth-htitle {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ap-text);
    margin-bottom: 6px;
    line-height: 1.2;
}

.auth-hsub {
    font-size: 13px;
    color: var(--ap-text-2);
    margin-bottom: 22px;
}

.auth-tabs {
    display: flex;
    background: var(--ap-surface-2);
    border-radius: var(--ap-radius-md);
    padding: 3px;
    margin-bottom: 22px;
}

.auth-tab,
.auth-sub-btn,
.auth-btn-secondary,
.auth-register-btn,
.auth-portal-back {
    -webkit-tap-highlight-color: transparent;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ap-text-2);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-tab.on {
    background: var(--ap-surface);
    color: var(--ap-text);
    border: 1px solid var(--ap-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-fld {
    margin-bottom: 14px;
}

.auth-fld label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ap-text-2);
    margin-bottom: 5px;
}

.auth-inp-wrap {
    position: relative;
}

.auth-inp-wrap i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--ap-text-3);
    pointer-events: none;
}

.auth-inp-wrap input {
    width: 100%;
    padding: 10px 11px 10px 34px;
    border: 1px solid var(--ap-border-2);
    border-radius: var(--ap-radius-md);
    font-size: 13px;
    background: var(--ap-surface);
    color: var(--ap-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}

.auth-inp-wrap input:focus {
    border-color: var(--ap-accent-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-accent-light) 18%, transparent);
}

.auth-root[data-portal="client"] .auth-inp-wrap input:focus {
    border-color: var(--ap-client-light);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

.auth-or-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 12px;
    color: var(--ap-text-3);
}

.auth-or-row::before,
.auth-or-row::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ap-border);
}

.auth-bio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: 1px solid var(--ap-border-2);
    border-radius: var(--ap-radius-md);
    background: var(--ap-surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--ap-text);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.auth-bio-btn:hover {
    background: var(--ap-surface-2);
    border-color: var(--ap-border);
}

.auth-bio-row {
    display: flex;
    gap: 10px;
}

.auth-sub-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: var(--ap-radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    color: #fff;
    margin-bottom: 4px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-sub-btn:active {
    transform: scale(0.985);
}

.auth-sub-btn:hover {
    opacity: 0.9;
}

.auth-link-row {
    text-align: right;
    margin-top: -4px;
    margin-bottom: 14px;
}

.auth-link-row a {
    font-size: 12px;
    color: var(--ap-accent-light);
    text-decoration: none;
}

.auth-link-row a:hover {
    text-decoration: underline;
}

.auth-switch-txt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    text-align: center;
    font-size: 12px;
    color: var(--ap-text-2);
    margin-top: 16px;
    line-height: 1.5;
}

.auth-switch-txt a {
    color: var(--ap-accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

.auth-switch-txt a:hover {
    text-decoration: underline;
}

.auth-root[data-portal="client"] .auth-link-row a,
.auth-root[data-portal="client"] .auth-switch-txt a,
.auth-portal-page--client .auth-link-row a,
.auth-portal-page--client .auth-switch-txt a {
    color: var(--ap-client);
}

.auth-root[data-portal="equipe"] .auth-link-row a,
.auth-root[data-portal="equipe"] .auth-switch-txt a,
.auth-portal-page--team .auth-link-row a,
.auth-portal-page--team .auth-switch-txt a {
    color: var(--ap-team);
}

.auth-alert {
    padding: 10px 12px;
    border-radius: var(--ap-radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-register-panel {
    text-align: center;
    padding: 20px 0;
}

.auth-register-panel i {
    font-size: 40px;
    margin-bottom: 14px;
    display: block;
}

.auth-register-panel p {
    font-size: 13px;
    color: var(--ap-text-2);
    line-height: 1.6;
    margin-bottom: 18px;
}

.auth-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--ap-radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.15s;
    background: var(--ap-accent);
}

.auth-register-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.auth-deco-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--ap-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.auth-deco-icon-wrap i {
    font-size: 24px;
}

.auth-deco-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ap-text);
    text-align: center;
}

.auth-deco-dsub {
    font-size: 11px;
    color: var(--ap-text-2);
    text-align: center;
    margin-top: 3px;
}

.auth-deco-sep {
    width: 1px;
    height: 36px;
    background: var(--ap-border);
}

.auth-deco-stat {
    text-align: center;
}

.auth-deco-num {
    font-size: 20px;
    font-weight: 600;
    color: var(--ap-text);
    font-family: 'Rethink Sans', sans-serif;
}

.auth-deco-lbl {
    font-size: 11px;
    color: var(--ap-text-2);
    margin-top: 2px;
}

.auth-hidden {
    display: none !important;
}

/* ── Layout inscription / formulaires Symfony ── */

.auth-pitem-link {
    text-decoration: none;
    color: inherit;
}

.auth-portal-pill--client {
    background: var(--ap-client-pill-bg);
    color: var(--ap-client-pill-text);
}

.auth-portal-pill--equipe {
    background: var(--ap-team-pill-bg);
    color: var(--ap-team-pill-text);
}

.auth-deco-icon-wrap--client {
    border-color: var(--ap-client-icon-border);
}

.auth-deco-icon-wrap--team {
    border-color: var(--ap-team-icon-border);
}

.auth-root[data-portal="client"] .auth-sub-btn,
.auth-portal-page--client .auth-sub-btn {
    background: var(--ap-client);
}

.auth-root[data-portal="equipe"] .auth-sub-btn,
.auth-portal-page--team .auth-sub-btn {
    background: var(--ap-team);
}

.auth-inp-wrap input.auth-input-inner,
.auth-inp-wrap select.auth-input-inner {
    width: 100%;
    padding: 10px 11px 10px 34px;
    border: 1px solid var(--ap-border-2);
    border-radius: var(--ap-radius-md);
    font-size: 13px;
    background: var(--ap-surface);
    color: var(--ap-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}

.auth-inp-wrap input.auth-input-inner:focus,
.auth-inp-wrap select.auth-input-inner:focus {
    border-color: var(--ap-team-light);
    box-shadow: 0 0 0 3px rgba(127, 119, 221, 0.12);
}

.auth-root[data-portal="client"] .auth-inp-wrap input.auth-input-inner:focus,
.auth-root[data-portal="client"] .auth-inp-wrap select.auth-input-inner:focus {
    border-color: var(--ap-client-light);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

.auth-inp-wrap input.auth-code-input {
    padding-left: 11px;
    font-size: 24px;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.35em;
    text-align: center;
}

.auth-fld-hint {
    font-size: 12px;
    color: var(--ap-text-2);
    margin-top: 6px;
}

.auth-field-error,
.auth-fld .form-error-message,
.auth-fld ul li,
.auth-fld .invalid-feedback {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
    list-style: none;
    padding: 0;
}

.auth-form-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
    .auth-side-panel {
        display: none;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .auth-card {
        padding: 32px 24px 24px;
    }
}

@media (max-width: 640px) {
    .auth-portal-page {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 100dvh;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .auth-portal-back {
        top: max(10px, env(safe-area-inset-top, 10px));
        left: max(12px, env(safe-area-inset-left, 12px));
        font-size: 12px;
    }

    .auth-shell,
    .auth-shell--compact {
        min-height: auto;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .auth-card {
        padding: 56px 16px 28px;
        justify-content: flex-start;
    }

    .auth-portal-pill {
        margin-bottom: 14px;
    }

    .auth-htitle {
        font-size: 20px;
    }

    .auth-hsub {
        font-size: 13px;
        margin-bottom: 18px;
        line-height: 1.5;
    }

    .auth-tabs {
        margin-bottom: 18px;
    }

    .auth-tab {
        min-height: 44px;
        font-size: 13px;
    }

    .auth-fld {
        margin-bottom: 12px;
    }

    .auth-inp-wrap input,
    .auth-inp-wrap input.auth-input-inner {
        font-size: 16px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .auth-inp-wrap input.auth-code-input {
        font-size: 22px;
        letter-spacing: 0.25em;
    }

    .auth-sub-btn,
    .auth-btn-secondary {
        min-height: 48px;
        font-size: 15px;
        padding: 13px 16px;
    }

    .auth-register-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: 13px 16px;
    }

    .auth-register-panel {
        padding: 12px 0 4px;
    }

    .auth-register-panel p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .auth-bio-btn {
        min-height: 48px;
    }

    .auth-pseudo-box {
        padding: 16px;
        margin: 16px 0 20px;
    }

    .auth-pseudo-box__value {
        font-size: 28px;
        letter-spacing: 0.1em;
    }

    .auth-success-icon {
        width: 56px;
        height: 56px;
    }

    .auth-success-icon i {
        font-size: 28px;
    }

    .auth-alert {
        font-size: 12px;
    }

    .auth-switch-txt {
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding-left: 12px;
        padding-right: 12px;
    }
}

.auth-symfony-form {
    width: 100%;
}

.auth-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--ap-text-2);
    width: 100%;
}

.auth-check-row input[type="hidden"] {
    display: none;
}

.auth-check-row input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    padding: 0;
    accent-color: var(--ap-team);
}

.auth-root[data-portal="client"] .auth-check-row input[type="checkbox"] {
    accent-color: var(--ap-client);
}

.auth-check-row label,
.auth-check-row .auth-check-label {
    display: block;
    flex: 1;
    min-width: 0;
    margin: 0;
    font-weight: 400;
    line-height: 1.45;
    font-size: 13px;
    color: var(--ap-text-2);
    cursor: pointer;
}

.auth-btn-secondary {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--ap-border-2);
    border-radius: var(--ap-radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: var(--ap-surface-2);
    color: var(--ap-text);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}

.auth-btn-secondary:hover {
    background: var(--ap-border);
}

.auth-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.auth-alert--warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.auth-alert--info {
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
}

.auth-passkey-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-passkey-divider {
    height: 1px;
    background: var(--ap-border);
    margin: 20px 0;
}

.auth-sub-btn--danger {
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
    box-shadow: none;
}

.auth-sub-btn--danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.auth-sub-btn i {
    margin-right: 6px;
}

.auth-passkey-panel .auth-alert i {
    margin-right: 6px;
    vertical-align: -2px;
}

.auth-passkey-panel .d-none {
    display: none !important;
}

.auth-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-success-icon i {
    font-size: 32px;
    color: #16a34a;
}

.auth-pseudo-box {
    background: var(--ap-surface-2);
    border: 2px dashed var(--ap-client);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0 24px;
    text-align: center;
}

.auth-pseudo-box__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ap-text-2);
    margin-bottom: 6px;
}

.auth-pseudo-box__value {
    font-size: 36px;
    font-weight: 800;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.15em;
    color: var(--ap-client);
}

.auth-recap {
    text-align: left;
    font-size: 13px;
    color: var(--ap-text-2);
    line-height: 1.8;
    margin-bottom: 20px;
}
