/* Page d'authentification unifiée — alignée sur les tokens Xaliss */
.auth-page {
    --auth-primary: #43277d;
    --auth-primary-dark: #341d5f;
    --auth-primary-light: #6b4c9e;
    --auth-surface: #ffffff;
    --auth-track: #ede9f5;
    --auth-input-bg: #f8f7fb;
    --auth-border: #e5e7eb;
    --auth-border-focus: rgba(67, 39, 125, 0.45);
    --auth-text: #1f2937;
    --auth-muted: #6b7280;
    --auth-label: #43277d;
    --auth-radius-card: 22px;
    --auth-radius-control: 10px;
    --auth-radius-pill: 999px;
    --auth-control-h: 48px;
    --auth-shadow-card: 0 20px 56px rgba(0, 0, 0, 0.2);
    --auth-shadow-btn: 0 4px 14px rgba(67, 39, 125, 0.32);
    --auth-btn-fill: linear-gradient(180deg, #4d2d8f 0%, #43277d 48%, #2f1a5c 100%);
    --auth-focus-ring: 0 0 0 3px rgba(67, 39, 125, 0.12);

    /* Tokens alignés landing (footer + nav) */
    --lp-primary: #43277d;
    --lp-primary-mid: #5a3a9e;
    --lp-primary-deep: #2a174f;
    --lp-primary-light: #8b6fc4;
    --lp-white: #ffffff;
    --lp-ink-soft: #2a2140;
    --lp-muted: #8b829e;
    --lp-display: 'Unbounded', 'Outfit', sans-serif;
    --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --lp-nav-h: 108px;

    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--auth-primary);
    background-image: url('../images/fond.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--auth-text);
}

.auth-main {
    flex: 1 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: calc(var(--lp-nav-h) + 2.35rem) 20px 4rem;
    box-sizing: border-box;
}

.auth-page .lp-nav,
.auth-page .lp-nav * {
    box-sizing: border-box;
}

.auth-page .lp-nav a {
    text-decoration: none;
}

/* Menu inversé — même rendu / dégradés que la landing */
.auth-page .lp-nav-pill {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, transparent 42%),
        linear-gradient(135deg, #ffffff 0%, #ebe3f6 42%, #d4c6ea 100%);
    border: 1px solid rgba(67, 39, 125, 0.16);
    box-shadow:
        0 10px 28px rgba(14, 10, 24, 0.14),
        0 4px 12px rgba(14, 10, 24, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(67, 39, 125, 0.12);
}

.auth-page .lp-nav-pill::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 45%);
    opacity: 0.9;
}

.auth-page .lp-nav.is-scrolled .lp-nav-pill {
    border-color: rgba(67, 39, 125, 0.2);
    box-shadow:
        0 12px 32px rgba(14, 10, 24, 0.16),
        0 4px 14px rgba(14, 10, 24, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(67, 39, 125, 0.14);
}

.auth-page .lp-brand {
    color: var(--lp-primary) !important;
    -webkit-text-fill-color: var(--lp-primary);
}

.auth-page .lp-nav-menu > a {
    color: rgba(67, 39, 125, 0.78);
}

.auth-page .lp-nav-menu > a:hover {
    color: var(--lp-primary);
    background: rgba(67, 39, 125, 0.08);
}

.auth-page .lp-nav-cta {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
        linear-gradient(135deg, #4d2d8f 0%, #43277d 42%, #2f1a5c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 4px 12px rgba(67, 39, 125, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18) !important;
}

.auth-page .lp-nav-cta:hover {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, transparent 42%),
        linear-gradient(135deg, #5a3a9e 0%, #43277d 42%, #2a174f 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 6px 16px rgba(67, 39, 125, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18) !important;
}

.auth-page .lp-nav-toggle {
    background: rgba(67, 39, 125, 0.08);
}

.auth-page .lp-nav-toggle:hover {
    background: rgba(67, 39, 125, 0.14);
}

.auth-page .lp-nav-toggle span {
    background: var(--lp-primary);
}

@media (max-width: 1100px) {
    .auth-page .lp-nav-menu {
        left: auto;
        right: 0;
        width: min(17.5rem, 100%);
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, transparent 42%),
            linear-gradient(160deg, #ffffff 0%, #ebe3f6 45%, #d4c6ea 100%);
        border: 1px solid rgba(67, 39, 125, 0.14);
        box-shadow:
            0 10px 24px rgba(14, 10, 24, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .auth-page .lp-nav-menu > a {
        color: var(--lp-primary);
    }

    .auth-page .lp-nav-menu > a:hover {
        background: rgba(67, 39, 125, 0.08);
    }
}

.auth-card {
    background: var(--auth-surface);
    border-radius: var(--auth-radius-card);
    padding: 34px 32px 30px;
    max-width: 680px;
    width: 100%;
    border: 1px solid rgba(67, 39, 125, 0.1);
    box-shadow: var(--auth-shadow-card);
    margin: 0;
    flex-shrink: 0;
}

/* Footer auth — mêmes tailles/positions que la landing ; barre blanche */
.auth-page .lp-footer,
.auth-page .lp-footer * {
    box-sizing: border-box;
}

.auth-page .lp-footer {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0;
    padding: 2.25rem 0 1.75rem;
    font-family: 'Outfit', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-page .lp-footer-brand {
    margin: 0.1rem 0 0.75rem;
}

.auth-page .lp-footer-logo {
    height: 150px;
    max-width: 680px;
}

.auth-page .lp-footer .lp-wrap {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.auth-page .lp-footer a {
    text-decoration: none;
}

/* Même barre que la landing (taille, position, animation) — en blanc */
.auth-page .lp-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(640px, 85%);
    height: 4px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 14%,
        #ffffff 50%,
        rgba(255, 255, 255, 0.55) 86%,
        transparent 100%
    );
    background-size: 200% 100%;
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.4),
        0 0 4px rgba(255, 255, 255, 0.55);
    animation: lp-footer-line 7s ease-in-out infinite;
}

.auth-page .lp-footer-heading {
    font-family: var(--lp-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.auth-page .lp-footer-list a {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--lp-ink-soft);
}

.auth-page .lp-footer-list a:hover {
    color: var(--lp-primary);
}

.auth-page .lp-footer-bottom {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    font-size: 0.88rem;
    border-top-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.78);
}

.auth-page .lp-footer-legal {
    gap: 1.35rem;
}

.auth-page .lp-footer-legal a {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
}

.auth-page .lp-footer-legal a:hover {
    color: #ffffff;
}

.auth-panel[data-panel="connexion"] > form,
.auth-panel[data-panel="connexion"] > .auth-divider,
.auth-panel[data-panel="connexion"] > .auth-google-wrap,
.auth-panel[data-panel="connexion"] > .non-field-errors {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

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

.auth-avatar {
    width: 50px;
    height: 50px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
}

.auth-avatar svg {
    width: 22px;
    height: 22px;
}

.auth-card h1 {
    color: var(--auth-primary);
    margin: 0 0 6px;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* Onglets Connexion / Inscription */
.auth-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-tabs {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    gap: 4px;
    padding: 4px;
    margin: 0;
    border-radius: var(--auth-radius-pill);
    background: var(--auth-track);
    isolation: isolate;
    box-sizing: border-box;
    min-height: calc(var(--auth-control-h) + 8px);
}

.auth-tabs-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: var(--auth-control-h);
    width: 0;
    border-radius: var(--auth-radius-pill);
    background: var(--auth-btn-fill);
    box-shadow: var(--auth-shadow-btn);
    transform: translateX(0);
    transition:
        transform 0.52s cubic-bezier(0.34, 1.15, 0.48, 1),
        width 0.52s cubic-bezier(0.34, 1.15, 0.48, 1);
    will-change: transform, width;
    pointer-events: none;
    z-index: 0;
}

.auth-tabs-slider.is-instant {
    transition: none;
}

.auth-tab {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: var(--auth-control-h);
    height: var(--auth-control-h);
    padding: 0 20px;
    border: none;
    border-radius: var(--auth-radius-pill);
    background: transparent;
    color: #7c7a8a;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.32s ease;
    white-space: nowrap;
}

.auth-tab:hover:not(.is-active) {
    color: var(--auth-primary);
}

.auth-tab.is-active {
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .auth-tabs-slider {
        transition: none;
    }
}

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

.auth-form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

/* Inscription — espacement aéré, bloc remonté */
.auth-panel[data-panel="inscription"] {
    padding-top: 0;
    margin-top: -4px;
}

.auth-panel[data-panel="inscription"] .auth-form-grid {
    gap: 20px 20px;
    margin-bottom: 0;
}

.auth-panel[data-panel="inscription"] .auth-label,
.auth-panel[data-panel="inscription"] label.auth-label {
    margin-bottom: 8px;
}

.auth-panel[data-panel="inscription"] .auth-btn {
    margin-top: 32px;
}

.auth-card:has(.auth-panel[data-panel="inscription"]:not([hidden])) .auth-tabs-wrap {
    margin-bottom: 22px;
}

.form-group {
    margin-bottom: 0;
    min-width: 0;
}

.form-group--full {
    grid-column: 1 / -1;
}

.auth-card a,
.auth-card a:hover,
.auth-card a:focus {
    text-decoration: none;
}

.auth-label,
.auth-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--auth-label);
    line-height: 1.3;
}

/* Exception : « Se souvenir de moi » reste en ligne avec « Mot de passe oublié ? » */
.auth-card .auth-options-row label.auth-remember,
.auth-card label.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    font-weight: 500;
    font-size: 0.84rem;
    line-height: 1.2;
    color: var(--auth-primary);
    width: auto;
    max-width: 100%;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.auth-options-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    width: 100%;
    margin: 2px 0 6px;
    min-height: 1.4em;
    line-height: 1.2;
}

.auth-remember span {
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.auth-checkbox-input {
    width: 13px;
    height: 13px;
    margin: 0;
    padding: 0;
    accent-color: var(--auth-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-forgot-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    font-size: 0.84rem;
    line-height: 1.2;
    min-height: 1.4em;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.auth-forgot-link:hover {
    opacity: 0.85;
}

.auth-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    display: flex;
    color: #a8a3b8;
    pointer-events: none;
}

.auth-field-icon svg {
    width: 17px;
    height: 17px;
}

.auth-input {
    width: 100%;
    min-height: var(--auth-control-h);
    padding: 0 14px 0 42px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    font-size: 0.94rem;
    font-family: inherit;
    font-weight: 400;
    color: var(--auth-text);
    background-color: var(--auth-input-bg);
    box-sizing: border-box;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input::placeholder {
    color: #b0b5c0;
    font-weight: 400;
}

.auth-input:hover {
    border-color: #d1d5db;
    background-color: #fff;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    background-color: #fff;
    box-shadow: var(--auth-focus-ring);
}

.form-group--kp-select {
    margin-bottom: 0;
}

.auth-page .kp-select-trigger {
    min-height: var(--auth-control-h);
    height: var(--auth-control-h);
    padding: 0 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    background-color: var(--auth-input-bg);
    font-size: 0.94rem;
    font-weight: 400;
    color: var(--auth-text);
    box-shadow: none;
    gap: 8px;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-page .kp-select-trigger:hover {
    border-color: #d1d5db;
    background-color: #fff;
    box-shadow: none;
}

.auth-page .kp-select-wrap.is-open .kp-select-trigger,
.auth-page .kp-select-trigger:focus {
    border-color: var(--auth-border-focus);
    background-color: #fff;
    box-shadow: var(--auth-focus-ring);
}

.auth-page .kp-select-trigger-label {
    font-weight: 400;
    color: var(--auth-text);
}

.auth-page .kp-select-trigger-label.is-placeholder {
    font-weight: 400;
    color: #b0b5c0;
}

.auth-page .kp-select-chevron {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

.auth-page .kp-select-chevron svg {
    width: 14px;
    height: 14px;
}

.auth-input--no-icon {
    padding-left: 14px;
}

.auth-field-wrap--password .auth-input {
    padding-right: 46px;
}

/* Masquer l'œil natif Edge/IE — évite le doublon avec .auth-password-toggle */
.auth-field-wrap--password .auth-input::-ms-reveal {
    display: none;
}

.auth-password-toggle {
    position: absolute;
    right: 8px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #a8a3b8;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: rgba(67, 39, 125, 0.06);
}

.auth-password-toggle svg {
    width: 17px;
    height: 17px;
}

/* Boutons principaux — même hauteur et rayon que les inputs */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--auth-control-h);
    padding: 0 20px;
    margin-top: 12px;
    background: var(--auth-btn-fill);
    color: #fff;
    border: none;
    border-radius: var(--auth-radius-control);
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--auth-shadow-btn);
    transition: box-shadow 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.auth-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 6px 18px rgba(67, 39, 125, 0.38);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
    color: #9ca3af;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.auth-google-wrap {
    display: flex;
    justify-content: center;
}

.auth-google-form {
    margin: 0;
}

.auth-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 148px;
    min-height: var(--auth-control-h);
    height: var(--auth-control-h);
    padding: 0 20px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-pill);
    background: #fff;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-google-btn:hover {
    border-color: #d1d5db;
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.auth-google-btn:active {
    transform: translateY(0);
}

.auth-google-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-hint {
    margin: 6px 0 0;
    color: var(--auth-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.field-error {
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 5px;
    line-height: 1.35;
}

.messages {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.messages li {
    padding: 10px 12px;
    border-radius: var(--auth-radius-control);
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.messages .success {
    background: #ecfdf5;
    color: #065f46;
}

.messages .error {
    background: #fef2f2;
    color: #991b1b;
}

.auth-flash-banner {
    padding: 12px 14px;
    border-radius: var(--auth-radius-control);
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 500;
}

.auth-flash-banner--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.auth-flash-banner--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.non-field-errors {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: var(--auth-radius-control);
    margin-bottom: 14px;
    font-size: 0.86rem;
    line-height: 1.45;
    border: 1px solid #fecaca;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--auth-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-back-link:hover {
    opacity: 0.85;
}

.auth-footer-link {
    margin-top: 18px;
    text-align: center;
    font-size: 0.88rem;
}

.auth-footer-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-link a:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* Cartes courtes (oubli / reset MDP) — éviter les inputs étirés */
.auth-card--narrow {
    max-width: 380px;
    padding: 26px 22px 22px;
}

.auth-card--narrow .auth-back-link {
    margin-bottom: 16px;
}

.auth-card--narrow .auth-back-link svg {
    width: 16px;
    height: 16px;
}

.auth-header--compact {
    margin-bottom: 20px;
}

.auth-kicker {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--auth-primary-light);
}

.auth-card--narrow h1 {
    font-family: 'Unbounded', 'Outfit', sans-serif;
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.auth-card--narrow .auth-subtitle {
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.88rem;
}

.auth-sent-email-line {
    display: inline;
    white-space: nowrap;
    font-weight: 700;
    color: var(--auth-primary);
}
.auth-avatar--lock,
.auth-avatar--ok {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(165deg, #fff 40%, rgba(67, 39, 125, 0.08) 100%);
    border-color: rgba(67, 39, 125, 0.14);
    color: var(--auth-primary);
}

.auth-avatar--ok {
    background: linear-gradient(165deg, #fff 40%, rgba(16, 185, 129, 0.12) 100%);
    border-color: rgba(4, 120, 87, 0.18);
    color: #047857;
}

.auth-form-stack--narrow,
.auth-card--narrow .auth-form-stack,
.auth-btn--block-narrow,
.auth-card--narrow > .auth-btn {
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.auth-card--narrow .non-field-errors {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.auth-card--narrow .auth-btn {
    margin-top: 6px;
}

.auth-card--reset .auth-form-stack--narrow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.auth-card--reset .auth-btn--compact,
.auth-card--reset .auth-btn {
    align-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 18px;
}

.auth-card--reset .form-group {
    width: 100%;
}
/* État « e-mail envoyé » */
.auth-card--sent {
    text-align: center;
    padding-top: 32px;
    padding-bottom: 28px;
}

.auth-sent {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-sent-badge {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 0 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #047857;
    background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(4, 120, 87, 0.18);
    box-shadow: 0 10px 24px rgba(4, 120, 87, 0.12);
}

.auth-sent-badge svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
}

.auth-sent-badge-ring {
    position: absolute;
    inset: -8px;
    border-radius: 26px;
    border: 1.5px dashed rgba(4, 120, 87, 0.28);
    animation: authSentPulse 2.4s ease-in-out infinite;
}

@keyframes authSentPulse {
    0%, 100% { opacity: 0.55; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

.auth-sent .auth-kicker {
    color: #047857;
}

.auth-sent h1 {
    margin-bottom: 8px;
}

.auth-sent .auth-subtitle {
    max-width: 34ch;
    margin: 0 auto 16px;
}

.auth-sent-email {
    display: inline;
    color: var(--auth-primary);
    font-weight: 700;
    word-break: break-all;
}

.auth-sent-dest {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 300px;
    margin: 0 0 16px;
    padding: 12px 14px;
    text-align: left;
    border-radius: 12px;
    background: rgba(67, 39, 125, 0.06);
    border: 1px solid rgba(67, 39, 125, 0.12);
}

.auth-sent-dest-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--auth-primary-light);
}

.auth-sent-dest strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-text);
    word-break: break-all;
}

.auth-sent-tips {
    list-style: none;
    margin: 0 0 22px;
    padding: 12px 14px;
    width: 100%;
    max-width: 300px;
    text-align: left;
    border-radius: 12px;
    background: rgba(67, 39, 125, 0.045);
    border: 1px solid rgba(67, 39, 125, 0.1);
}

.auth-sent-tips li {
    position: relative;
    padding: 5px 0 5px 18px;
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--auth-muted);
}

.auth-sent-tips li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--auth-primary-light);
}

.auth-sent-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.auth-btn--compact {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 22px;
    margin-top: 0;
}

.auth-text-link {
    color: var(--auth-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

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

@media (max-width: 720px) {
    .auth-card {
        padding: 26px 18px 22px;
        border-radius: 18px;
        max-width: 92%;
        width: 92%;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-card--narrow {
        max-width: min(360px, 92%);
        padding: 22px 16px 18px;
    }

    .auth-card--sent {
        padding-top: 28px;
        padding-bottom: 24px;
    }

    .auth-panel[data-panel="connexion"] > form,
    .auth-panel[data-panel="connexion"] > .auth-divider,
    .auth-panel[data-panel="connexion"] > .auth-google-wrap,
    .auth-panel[data-panel="connexion"] > .non-field-errors {
        max-width: none;
    }

    .auth-card h1 {
        font-size: 1.45rem;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .auth-panel[data-panel="inscription"] .auth-form-grid {
        gap: 20px;
    }

    .auth-panel[data-panel="inscription"] .auth-btn {
        margin-top: 28px;
    }

    .form-group--full {
        grid-column: auto;
    }

    .auth-options-row {
        flex-wrap: nowrap;
        align-items: center;
    }

    .auth-forgot-link {
        white-space: nowrap;
    }
}

@media (max-width: 720px) {
    .auth-page {
        --lp-nav-h: 88px;
    }

    .auth-main {
        align-items: flex-start;
        padding: calc(var(--lp-nav-h) + 1.75rem) 14px 3rem;
    }

    .auth-page .lp-footer {
        padding: 2rem 0 1.5rem;
    }

    .auth-page .lp-footer-brand {
        margin: 0 0 0.65rem;
    }

    .auth-page .lp-footer-logo {
        height: 100px;
        max-width: min(92vw, 420px);
    }

    .auth-page .lp-footer .lp-wrap {
        width: min(1120px, calc(100% - 2rem));
    }
}

@media (max-width: 380px) {
    .auth-tab {
        min-width: 96px;
        min-height: var(--auth-control-h);
        height: var(--auth-control-h);
        font-size: 0.84rem;
        padding: 0 14px;
    }
}

/* ——— Tablette : mêmes gouttières latérales que la landing ——— */
@media (min-width: 981px) and (max-width: 1100px) {
    .auth-page .lp-footer .lp-wrap {
        width: min(1120px, calc(100% - var(--lp-gutter) * 2));
    }
}

@media (min-width: 721px) and (max-width: 980px) {
    /* Carte et pied de page calés sur la colonne commune (--lp-mobile-col) */
    .auth-card {
        box-sizing: border-box;
        width: min(100%, var(--lp-mobile-col));
        margin-inline: auto;
    }

    .auth-page .lp-footer .lp-wrap {
        width: var(--lp-mobile-col);
    }
}
