/* Écrans hors connexion (connexion, première connexion, mot de passe, choix du club) — complète app.css
   Ordinateur : formulaire à gauche, panneau de présentation à droite.
   Mobile : bandeau de marque sombre, puis formulaire dans une feuille aux coins arrondis. */

body.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--app-surface);
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth-shell.is-wide { grid-template-columns: minmax(0, 1fr) minmax(340px, 34%); }

/* ---------- Colonne du formulaire ---------- */
.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px 48px;
}
.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--app-text);
    text-decoration: none;
}
.auth-logo-tile {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.auth-logo-tile img { width: 48px; height: 48px; border-radius: 12px; box-shadow: var(--app-shadow-sm); }
.auth-brand-name {
    font-family: var(--app-font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -.01em;
    text-transform: uppercase;
}
.auth-brand-logo { display: none; }

.auth-sheet {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.auth-content {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 40px 0;
    animation: auth-in .45s cubic-bezier(.2, .7, .2, 1) both;
}
.is-wide .auth-content { max-width: 720px; }

.auth-heading { margin-bottom: 28px; }
.auth-heading-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 16px;
    font-size: 1.45rem;
    color: var(--app-accent);
    background: var(--app-accent-soft);
    box-shadow: inset 0 0 0 1px var(--app-accent-soft-strong);
}
.auth-title {
    font-family: var(--app-font-heading);
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0 0 8px;
}
.auth-subtitle { color: var(--app-muted); font-size: 1rem; margin: 0; }

.auth-footer {
    padding-top: 16px;
    font-size: .8125rem;
    color: var(--app-subtle);
    text-align: center;
}
.auth-footer a { color: inherit; }
.auth-footer a:hover { color: var(--app-text-secondary); }

@keyframes auth-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Panneau de présentation ---------- */
.auth-aside { padding: 16px 16px 16px 0; min-width: 0; }
.auth-aside-inner {
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 56px clamp(32px, 4vw, 64px);
    border-radius: 28px;
    color: #fff;
    isolation: isolate;
    background:
        radial-gradient(70% 55% at 100% 0%, rgba(var(--app-accent-rgb), .65), transparent 70%),
        radial-gradient(60% 50% at 0% 100%, rgba(var(--app-accent-rgb), .4), transparent 70%),
        var(--app-sidebar-bg);
}
.auth-aside-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000, transparent 75%);
}
.auth-aside-inner::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 48px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .02);
}
.auth-aside-body { margin-block: auto; max-width: 480px; }
.auth-aside-overline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    margin-bottom: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
}
.auth-aside-overline::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(var(--app-accent-rgb), .6);
}
.auth-aside h2 {
    color: #fff;
    font-size: clamp(1.75rem, 1rem + 1.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin-bottom: 14px;
}
.auth-aside-lead { color: rgba(255, 255, 255, .72); font-size: 1.0625rem; line-height: 1.55; margin: 0; }
.auth-features { list-style: none; padding: 0; margin: 36px 0; display: grid; gap: 20px; }
.auth-features li { display: flex; align-items: center; gap: 16px; }
.auth-features .auth-feature-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    font-size: 1.45rem;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.auth-features strong { display: block; font-size: .975rem; font-weight: 600; }
.auth-features li > div > span { display: block; color: rgba(255, 255, 255, .62); font-size: .875rem; }
.auth-aside .btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-color: var(--app-text);
    --bs-btn-border-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .9);
    --bs-btn-hover-border-color: transparent;
}

/* ---------- Champs et boutons ---------- */
.auth-page .form-label { font-weight: 600; color: var(--app-text-secondary); margin-bottom: 6px; }
.auth-page .form-control,
.auth-page .form-select {
    min-height: 50px;
    font-size: 1rem;              /* 16 px : évite le zoom automatique d'iOS au focus */
    border-radius: 12px;
    padding-inline: 14px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.auth-page .form-control:disabled { background: var(--app-surface-muted); color: var(--app-text-secondary); }
.auth-page .form-text { font-size: .8125rem; color: var(--app-muted); margin-top: 6px; }
.auth-page .form-check-input { width: 1.15em; height: 1.15em; }
.auth-page .btn-lg,
.auth-page .btn-auth {
    min-height: 52px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-page .btn-primary.btn-auth,
.auth-page .btn-primary.btn-lg { box-shadow: 0 8px 20px -8px rgba(var(--app-accent-rgb), .65); }
.auth-page .btn-primary.btn-auth:hover,
.auth-page .btn-primary.btn-lg:hover { transform: translateY(-1px); }
.auth-page .btn { transition: transform .15s, box-shadow .15s, background-color .15s, border-color .15s; }
.auth-page .alert { border-radius: 12px; }

/* Moyens de connexion : « Continuer avec Google » (couleurs imposées par la charte Google) et « avec mon email »,
   présentés à égalité ; le formulaire n'apparaît qu'après le choix (data-auth-step, auth.js) */
.auth-methods { display: grid; gap: 12px; }
[data-auth-step]:not([hidden]) { animation: auth-in .35s cubic-bezier(.2, .7, .2, 1) both; }
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--app-muted);
    text-decoration: none;
}
.auth-back:hover { color: var(--app-text); }
.auth-back .bi { transition: transform .15s; }
.auth-back:hover .bi { transform: translateX(-2px); }
.btn-auth-method .bi { font-size: 1.15rem; color: var(--app-accent); }
.btn-google,
.btn-auth-method {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f1f1f;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    box-shadow: var(--app-shadow-xs);
}
.btn-google:hover,
.btn-auth-method:hover { color: #1f1f1f; background: #f8f9fa; border-color: #c6cad0; box-shadow: var(--app-shadow-md); transform: translateY(-1px); }
.btn-google:focus-visible,
.btn-auth-method:focus-visible { outline: none; box-shadow: var(--app-focus-ring); }
.btn-google.is-loading { pointer-events: none; opacity: .7; }
.btn-google-logo { width: 20px; height: 20px; flex-shrink: 0; }
.btn-google + .auth-divider { margin: 20px 0; }

/* Champ avec icône à gauche et éventuel bouton à droite (afficher le mot de passe) */
.input-icon { position: relative; }
.input-icon > .bi {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-subtle);
    pointer-events: none;
    transition: color .15s;
}
.input-icon > .form-control { padding-left: 44px; }
.input-icon:focus-within > .bi { color: var(--app-accent); }
.input-icon.has-action > .form-control { padding-right: 52px; }
.input-action {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--app-muted);
    border-radius: 0 12px 12px 0;
}
.input-action:hover { color: var(--app-text); }
.input-action:focus-visible { outline: none; box-shadow: var(--app-focus-ring); }

.caps-hint { display: none; margin-top: 6px; font-size: .8125rem; color: #b54708; }
.caps-hint.show { display: block; }

/* Robustesse du mot de passe et confirmation */
.pw-meter { display: flex; gap: 6px; margin-top: 10px; }
.pw-meter span { flex: 1; height: 4px; border-radius: 4px; background: var(--app-border); transition: background-color .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--app-danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--app-warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--app-info); }
.pw-meter[data-score="4"] span { background: var(--app-success); }
.pw-rules { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--app-muted); }
.pw-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.pw-rules li.ok { color: #079455; }
.pw-match { margin-top: 6px; font-size: .8125rem; min-height: 1.2em; }
.pw-match.ok { color: #079455; }
.pw-match.ko { color: var(--app-danger); }

/* Séparateur « ou », liens et encadrés */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 20px;
    font-size: .8125rem;
    color: var(--app-subtle);
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--app-border); }

.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-top: 24px; font-size: .9rem; }
.auth-links a { font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-note {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 20px;
    font-size: .875rem;
    color: var(--app-text-secondary);
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: 12px;
}
.auth-note > .bi { color: var(--app-muted); font-size: 1.1rem; line-height: 1.3; }
.auth-note p { margin: 0; }

/* Lien mis en avant (ex. « Première connexion ») et choix dans une liste (compte, club) */
.auth-choice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-align: left;
    color: var(--app-text);
    text-decoration: none;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    transition: border-color .15s, box-shadow .15s, transform .15s, background-color .15s;
}
.auth-choice:hover { color: var(--app-text); border-color: rgba(var(--app-accent-rgb), .45); box-shadow: var(--app-shadow-md); transform: translateY(-1px); }
.auth-choice:focus-visible { outline: none; box-shadow: var(--app-focus-ring); border-color: var(--app-accent); }
.auth-choice:disabled { opacity: .6; transform: none; }
.auth-choice.is-current { border-color: var(--app-accent); background: var(--app-accent-soft); }
.auth-choice-body { flex: 1; min-width: 0; }
.auth-choice-body strong { display: block; font-weight: 600; }
.auth-choice-body span { display: block; font-size: .8125rem; color: var(--app-muted); }
.auth-choice > .bi-chevron-right { color: var(--app-subtle); transition: transform .15s, color .15s; }
.auth-choice:hover > .bi-chevron-right { color: var(--app-accent); transform: translateX(2px); }
.auth-choice-list { display: grid; gap: 10px; }

/* Message de confirmation (email envoyé, lien expiré) */
.auth-content:has(.auth-state) .auth-heading { text-align: center; }
.auth-state { text-align: center; padding: 8px 0 4px; }
.auth-state-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--app-accent);
    background: var(--app-accent-soft);
    box-shadow: 0 0 0 10px rgba(var(--app-accent-rgb), .06);
}
.auth-state-icon.is-warning { color: #dc6803; background: #fef4e6; box-shadow: 0 0 0 10px rgba(247, 144, 9, .08); }
.auth-state p { color: var(--app-text-secondary); }

/* Récapitulatif (licence reconnue, adresse confirmée) */
.auth-recap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 14px;
    font-size: .9rem;
}
.auth-recap .icon-tile { background: #fff; color: #079455; }
.auth-recap strong { display: block; }
.auth-recap span { color: var(--app-text-secondary); }
.auth-recap a { margin-left: auto; font-size: .8125rem; font-weight: 600; white-space: nowrap; }

/* Étapes (première connexion) */
.auth-steps { list-style: none; display: flex; padding: 0; margin: 0 0 28px; }
.auth-steps li {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 600;
    text-align: center;
    color: var(--app-subtle);
}
.auth-steps li::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--app-border);
}
.auth-steps li:first-child::before { display: none; }
.auth-step-dot {
    position: relative;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: .8125rem;
    background: var(--app-surface);
    border: 2px solid var(--app-border);
    border-radius: 50%;
    transition: all .2s;
}
.auth-steps li.done { color: var(--app-text-secondary); }
.auth-steps li.done::before,
.auth-steps li.active::before { background: var(--app-accent); }
.auth-steps li.done .auth-step-dot { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.auth-steps li.active { color: var(--app-accent); }
.auth-steps li.active .auth-step-dot { border-color: var(--app-accent); color: var(--app-accent); box-shadow: var(--app-focus-ring); }

/* Sections d'un long formulaire */
.auth-section { padding: 20px 0; border-top: 1px solid var(--app-border); }
.auth-section:first-of-type { border-top: 0; padding-top: 0; }
.auth-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: .95rem; font-weight: 650; }
.auth-section-title .icon-tile { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }

/* Fenêtre modale de choix du compte */
.auth-page .modal-content { border: 0; border-radius: 20px; box-shadow: var(--app-shadow-lg); }
.auth-page .modal-header,
.auth-page .modal-body { padding-inline: 24px; }

/* Lien affiché seulement quand le panneau est masqué */
.auth-mobile-cta { display: none; }

/* ---------- Identité de l'espace : badge et sélecteur ---------- */
.auth-brand { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.auth-space-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    font-size: .8125rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}
.auth-space-badge > .bi {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: .9rem;
}
.auth-space-club .auth-space-badge { color: #fff; background: var(--app-sidebar-bg); }
.auth-space-club .auth-space-badge > .bi { background: rgba(255, 255, 255, .12); }
.auth-space-participant .auth-space-badge {
    color: var(--app-accent-hover);
    background: #fff;
    border: 1px solid var(--app-accent-soft-strong);
    box-shadow: var(--app-shadow-xs);
}
.auth-space-participant .auth-space-badge > .bi { color: #fff; background: linear-gradient(135deg, #e63338, #8f1418); }

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 28px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: 16px;
}
.auth-switch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    color: var(--app-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: background-color .15s, box-shadow .15s, color .15s;
}
.auth-switch-item > .bi {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(16, 24, 40, .05);
    transition: background-color .15s, color .15s;
}
.auth-switch-item span { min-width: 0; line-height: 1.25; }
.auth-switch-item strong { display: block; font-size: .875rem; font-weight: 600; color: var(--app-text-secondary); }
.auth-switch-item small { display: block; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-switch-item:hover { color: var(--app-text-secondary); background: rgba(255, 255, 255, .7); }
.auth-switch-item:focus-visible { outline: none; box-shadow: var(--app-focus-ring); }
.auth-switch-item.is-active { background: #fff; box-shadow: var(--app-shadow-xs), 0 0 0 1px var(--app-border); }
.auth-switch-item.is-active strong { color: var(--app-text); }
/* Chaque onglet garde la couleur de son espace, même vu depuis l'autre */
.auth-switch-club.is-active > .bi { color: #fff; background: var(--app-sidebar-bg); }
.auth-switch-participant.is-active > .bi { color: #fff; background: linear-gradient(135deg, #e63338, #8f1418); }

/* ---------- Espace participant : thème rouge et lumineux, panneau à gauche ---------- */
body.auth-space-participant {
    --app-accent: #e63338;
    --app-accent-rgb: 230, 51, 56;
    --app-accent-hover: #c4262b;
    --app-accent-soft: #fdecec;
    --app-accent-soft-strong: #f9d0d1;
    --app-focus-ring: 0 0 0 3px rgba(230, 51, 56, .22);
    --bs-primary: var(--app-accent);
    --bs-primary-rgb: var(--app-accent-rgb);
    --bs-primary-bg-subtle: var(--app-accent-soft);
    --bs-primary-border-subtle: var(--app-accent-soft-strong);
    --bs-primary-text-emphasis: var(--app-accent-hover);
    --bs-link-color: var(--app-accent);
    --bs-link-color-rgb: var(--app-accent-rgb);
    --bs-link-hover-color: var(--app-accent-hover);
    background:
        radial-gradient(50% 40% at 100% 0%, rgba(230, 51, 56, .07), transparent 70%),
        radial-gradient(45% 40% at 60% 100%, rgba(18, 18, 18, .04), transparent 70%),
        #f5f5f5;
}
.auth-space-participant .auth-aside { order: -1; padding: 16px 0 16px 16px; }
.auth-space-participant .auth-aside-inner {
    background:
        radial-gradient(60% 45% at 0% 0%, rgba(255, 255, 255, .22), transparent 70%),
        radial-gradient(70% 55% at 100% 100%, rgba(18, 18, 18, .55), transparent 70%),
        linear-gradient(155deg, #ef4a4f 0%, #e63338 45%, #8f1418 100%);
}
/* Couloirs de piste d'athlétisme à la place de la grille de l'espace club */
.auth-space-participant .auth-aside-inner::before {
    background-image: repeating-linear-gradient(-32deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 42px);
    background-size: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.auth-space-participant .auth-aside-inner::after {
    right: auto;
    left: -160px;
    bottom: -150px;
    width: 560px;
    height: 300px;
    border-radius: 999px;
    border: 2px dashed rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .05), 0 0 0 84px rgba(255, 255, 255, .035);
}
.auth-space-participant .auth-aside-overline { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); }
.auth-space-participant .auth-aside-overline::before { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.auth-space-participant .auth-aside-lead { color: rgba(255, 255, 255, .86); }
.auth-space-participant .auth-features li > div > span { color: rgba(255, 255, 255, .78); }
.auth-space-participant .auth-features .auth-feature-icon { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); }
.auth-space-participant .auth-heading-icon { color: #fff; background: linear-gradient(135deg, #e63338, #8f1418); box-shadow: 0 10px 22px -10px rgba(230, 51, 56, .6); }
.auth-space-participant .auth-note { background: var(--app-accent-soft); border-color: var(--app-accent-soft-strong); }
.auth-space-participant .auth-note > .bi { color: var(--app-accent); }
.auth-space-participant .auth-switch { background: #fdecec; border-color: var(--app-accent-soft-strong); }

/* Espace club : icône de titre sombre, assortie au panneau */
.auth-space-club .auth-heading-icon { color: #fff; background: var(--app-sidebar-bg); box-shadow: 0 10px 22px -12px rgba(15, 22, 35, .8); }

@media (min-width: 992px) {
    /* Participant : formulaire posé dans une carte surélevée (le club reste à plat sur fond blanc) */
    .auth-space-participant .auth-content {
        max-width: 480px;
        padding: 36px 40px;
        background: #fff;
        border: 1px solid rgba(230, 51, 56, .1);
        border-radius: 24px;
        box-shadow: 0 24px 48px -24px rgba(120, 18, 22, .28), 0 2px 6px rgba(16, 24, 40, .04);
    }
    .auth-space-participant .auth-sheet { padding-block: 24px; }
}

/* ---------- Tablette et mobile ---------- */
@media (max-width: 991.98px) {
    body.auth-page {
        background:
            radial-gradient(80% 45% at 100% 0%, rgba(255, 255, 255, .18), transparent 70%),
            linear-gradient(165deg, var(--app-accent) 0%, color-mix(in srgb, var(--app-accent) 55%, #000) 100%);
        background-attachment: fixed;
    }
    .auth-shell,
    .auth-shell.is-wide { display: block; }
    .auth-aside { display: none; }
    .auth-main {
        min-height: 100vh;
        min-height: 100dvh;
        justify-content: center;
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    }

    .auth-brand { flex-direction: column; justify-content: center; gap: 10px; padding: 4px 0 14px; }
    .auth-space-badge { padding-block: 3px; font-size: .75rem; }
    .auth-space-badge > .bi { width: 24px; height: 24px; font-size: .8rem; }
    .auth-space-club .auth-space-badge { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
    .auth-space-participant .auth-space-badge { border-color: transparent; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .4); }

    /* Club : bleu nuit profond ; participant : dégradé rouge */
    body.auth-space-club {
        background:
            radial-gradient(80% 45% at 100% 0%, rgba(var(--app-accent-rgb), .55), transparent 70%),
            radial-gradient(70% 40% at 0% 100%, rgba(var(--app-accent-rgb), .35), transparent 70%),
            var(--app-sidebar-bg);
        background-attachment: fixed;
    }
    body.auth-space-participant {
        background:
            radial-gradient(70% 40% at 0% 0%, rgba(255, 255, 255, .2), transparent 70%),
            linear-gradient(160deg, #ef4a4f 0%, #e63338 45%, #8f1418 100%);
        background-attachment: fixed;
    }

    .auth-switch { margin-bottom: 18px; border-radius: 14px; }
    .auth-switch-item { gap: 8px; padding: 8px; }
    .auth-switch-item > .bi { width: 30px; height: 30px; border-radius: 9px; }
    .auth-switch-item small { display: none; }
    .auth-logo-tile,
    .auth-brand-name { display: none; }
    .auth-brand-logo { display: block; width: 200px; height: auto; }
    /* Le rouge du logo clair se confondrait avec le fond rouge : plaque blanche */
    .auth-space-participant .auth-brand-logo {
        box-sizing: content-box;
        padding: 10px 18px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .45);
    }

    /* Carte blanche entourée de la couleur du club, centrée avec le logo */
    .auth-sheet {
        flex: 0 0 auto;
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
        padding: 0 18px 12px;
        background: var(--app-surface);
        border-radius: 22px;
        box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .45);
    }
    .auth-content,
    .is-wide .auth-content { max-width: none; margin: 0; padding: 22px 0 0; }
    .auth-footer { padding-top: 14px; font-size: .75rem; }

    .auth-heading { margin-bottom: 16px; }
    .auth-heading-icon { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; font-size: 1.15rem; }
    .auth-title { font-size: 1.35rem; margin-bottom: 4px; }
    .auth-subtitle { font-size: .875rem; }

    .auth-page .form-label { font-size: .875rem; margin-bottom: 4px; }
    .auth-page .form-control,
    .auth-page .form-select { min-height: 46px; }
    .auth-page .btn-lg,
    .auth-page .btn-auth { min-height: 48px; }
    .auth-page .form-text { margin-top: 4px; font-size: .75rem; }
    .auth-steps { margin-bottom: 18px; }
    .auth-divider { margin: 18px 0 12px; }
    .btn-google,
    .btn-auth-method { min-height: 48px; }
    .auth-methods { gap: 10px; }
    .auth-back { margin-bottom: 12px; }
    .btn-google + .auth-divider { margin: 14px 0; }
    .auth-choice { padding: 10px 12px; gap: 12px; border-radius: 12px; }
    .auth-choice .icon-tile { width: 36px; height: 36px; border-radius: 10px; }
    .auth-choice-body span { font-size: .75rem; }
    .auth-links { margin-top: 16px; }
    .auth-note { margin-top: 14px; padding: 12px 14px; font-size: .8125rem; }
    .auth-hint-desktop { display: none; }

    .auth-mobile-cta { display: flex; }

    /* Liens secondaires de la connexion : deux tuiles côte à côte */
    .auth-alt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
    .auth-alt-grid .auth-choice { gap: 10px; padding: 10px; font-size: .8125rem; line-height: 1.25; }
    .auth-alt-grid .auth-choice .icon-tile { width: 32px; height: 32px; flex-shrink: 0; }
    .auth-alt-grid .auth-choice-body span,
    .auth-alt-grid .bi-chevron-right { display: none; }
}

/* Mobiles à faible hauteur : on garde l'essentiel visible sans défilement */
@media (max-width: 991.98px) and (max-height: 640px) {
    .auth-content:has(#loginForm) .auth-subtitle,
    .auth-footer { display: none; }
    .auth-content { padding-top: 18px; }
    .auth-brand { padding-bottom: 10px; }
    .auth-brand-logo { width: 150px; }
}

@media (max-width: 399.98px) {
    .auth-main { padding-inline: 8px; }
    .auth-sheet { padding-inline: 14px; }
    .auth-title { font-size: 1.25rem; }
    .auth-steps li:not(.active) .auth-step-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-content { animation: none; }
    .auth-page .btn,
    .auth-choice { transition: none; }
    .auth-page .btn:hover,
    .auth-choice:hover { transform: none; }
}
