/**
 * FECABI — Shared design system
 * Dark theme · Cameroon colours · Mobile-first
 *
 * Locked palette:
 *   Background:  #050505
 *   Green CTA:   #1a7a4c → #21965c  + thin Gold border #e8c872
 *   Gold accent: #e8c872
 *   Red (accent only, not full field borders): #ce1126
 *
 * GLOBAL FORM THEME (all screens — auth, LiteKYC, équipe, future):
 *   Entry controls use .field__panel / .form-control / .upload-zone
 *   Default: dark fill + neutral border
 *   Focus / active: GOLD lining (#e8c872) + soft gold ring
 *   Do not invent alternate field chrome per page.
 */

:root {
  --bg: #050505;
  --bg-elevated: #0c0c0c;
  --bg-card: #101410;
  --green: #1a7a4c;
  --green-hover: #21965c;
  --green-active: #15633e;
  --gold: #e8c872;
  --gold-soft: #e8c872;
  --gold-muted: rgba(232, 200, 114, 0.7);
  --gold-dim: rgba(232, 200, 114, 0.35);
  --red: #ce1126;
  --red-soft: rgba(206, 17, 38, 0.55);
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --text-dim: #6b6b6b;
  --border-neutral: rgba(255, 255, 255, 0.12);
  --border-neutral-strong: rgba(255, 255, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-green: rgba(26, 122, 76, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  /* Soft gold focus ring — high visibility on dark fields */
  --focus-ring: 0 0 0 3px rgba(232, 200, 114, 0.45);
  --focus-ring-soft: 0 0 0 3px rgba(232, 200, 114, 0.28);
  --error: #e85a6b;
}

/* ── Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
  color: inherit;
}

/* ── Layout shell ──────────────────────────────────── */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.65rem 1rem 0;
}

.page--wide {
  max-width: 720px;
}

/*
 * ═══════════════════════════════════════════════════════
 * SHARED: .site-brand  (header / brand block)
 * Use on every page via data-site-brand + site-shell.js
 * or paste the same markup with these classes.
 *   1. .site-brand__title  — page title (ESPACE MEMBRES, …)
 *   2. .site-brand__logo   — logo.png
 *   3. .site-brand__org    — Fédération Camerounaise de Billard
 *   4. .site-brand__accent — green / red / gold rule
 * ═══════════════════════════════════════════════════════
 */
.site-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  /* Gap between tricolour rule and page content (e.g. Sign-in card) */
  margin: 0 0 calc(1.5rem + 6px);
  text-align: center;
  flex-shrink: 0;
}

/*
 * Auth connexion: FR | LOGO | EN — one row, logo dead-center
 * FR left of logo, EN right of logo (equal columns)
 */
.site-brand--auth-lang .site-brand__logo-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  width: min(100%, 22rem);
  max-width: 100%;
  column-gap: 0.65rem;
  margin: 0.15rem 0 0;
  box-sizing: border-box;
}
.site-brand--auth-lang .site-brand__logo-row .site-brand__logo-btn {
  grid-column: 2;
  justify-self: center;
}
.site-brand--auth-lang .site-brand__lang-btn[data-lang="fr"] {
  grid-column: 1;
  justify-self: end;
}
.site-brand--auth-lang .site-brand__lang-btn[data-lang="en"] {
  grid-column: 3;
  justify-self: start;
}
.site-brand--auth-lang .site-brand__lang-btn {
  min-width: 2.75rem;
  height: 2.35rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.site-brand--auth-lang .site-brand__lang-btn:hover {
  border-color: rgba(232, 200, 114, 0.55);
  color: #fff;
}
.site-brand--auth-lang .site-brand__lang-btn.is-active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(232, 200, 114, 0.12);
  box-shadow: 0 0 0 1px rgba(232, 200, 114, 0.2);
}
.site-brand--auth-lang .site-brand__lang-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Page title — large, pure white (link to institutional home) */
.site-brand__title,
a.site-brand__title,
a.site-brand__title-link {
  margin: 0;
  font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
a.site-brand__title:hover,
a.site-brand__title-link:hover {
  color: #fff;
  text-decoration: none;
}

/* Logo — institutional home link (session preserved) */
.site-brand__logo-btn,
a.site-brand__logo-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.site-brand__logo-btn:hover .site-brand__logo,
.site-brand__logo-btn:focus-visible .site-brand__logo {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(232, 200, 114, 0.35), 0 0 14px rgba(26, 122, 76, 0.35);
}

.site-brand__logo-btn:focus-visible {
  outline: none;
}

.site-brand__logo-btn:active {
  transform: scale(0.97);
}

/* Logo — ~2 steps larger than previous auth size */
.site-brand__logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border-green);
  background: var(--bg-card);
  padding: 0.4rem;
  margin-top: 0.1rem;
  pointer-events: none; /* clicks hit the button */
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.site-brand__logo-fallback {
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-green);
  background: var(--bg-card);
  color: var(--gold-soft);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
  pointer-events: none;
}

/* Leave-home confirm (non-auto-save forms) — CSE theme; works without membres.css */
.em-modal-open {
  overflow: hidden;
}

.fecabi-leave-modal.em-modal,
.em-modal.fecabi-leave-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.fecabi-leave-modal[hidden] {
  display: none !important;
}

.fecabi-leave-modal .em-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.fecabi-leave-modal .em-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 20rem;
  padding: 1.25rem 1.15rem 1.15rem;
  background: var(--bg-card, #101410);
  border: 1px solid var(--border-green, #1a7a4c);
  border-radius: var(--radius, 12px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(232, 200, 114, 0.12);
}

.fecabi-leave-modal .em-modal__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius, 12px) var(--radius, 12px) 0 0;
  background: linear-gradient(
    90deg,
    var(--green, #1a7a4c) 0%,
    var(--green, #1a7a4c) 33.33%,
    var(--red, #ce1126) 33.33%,
    var(--red, #ce1126) 66.66%,
    var(--gold, #e8c872) 66.66%,
    var(--gold, #e8c872) 100%
  );
}

.fecabi-leave-modal .em-modal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--gold-soft, #e8c872);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.fecabi-leave-modal .em-modal__title {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.fecabi-leave-modal .em-modal__hint {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.45;
  color: rgba(240, 240, 240, 0.72);
}

.fecabi-leave-modal .em-modal__actions {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.fecabi-leave-modal .em-modal__actions .btn {
  flex: 1;
  margin: 0;
}

/* Org name under logo — single centered row */
.site-brand__org {
  margin: 0.05rem 0 0;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(240, 240, 240, 0.72);
  text-align: center;
  white-space: nowrap;
}

/* Thin Cameroon tricolour rule (green / red / gold) */
.site-brand__accent {
  display: flex;
  width: 52px;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.site-brand__accent span {
  flex: 1;
  display: block;
}

.site-brand__accent span:nth-child(1) {
  background: var(--green);
}

.site-brand__accent span:nth-child(2) {
  background: var(--red);
}

.site-brand__accent span:nth-child(3) {
  background: var(--gold);
}

/*
 * ═══════════════════════════════════════════════════════
 * SHARED: .site-footer  (2 compact rows — every page)
 *   1) WWW.FECABI.ORG
 *   2) Powered by YeloBall → The Cue Sports Engine
 * ═══════════════════════════════════════════════════════
 */
.site-footer {
  margin-top: auto;
  padding: 0.55rem 1rem 0.5rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.4));
  flex-shrink: 0;
}

.site-footer--compact {
  padding: 0.4rem 0.75rem 0.35rem;
}

.site-footer__name {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0 0 0.18rem;
  line-height: 1.3;
}

/* legacy class kept if any page still injects address */
.site-footer__address {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

/* Powered-by line — Gold accent */
.site-footer__powered {
  font-size: 0.6rem;
  color: var(--gold-muted);
  margin: 0;
  line-height: 1.3;
}

.site-footer__powered a {
  color: var(--gold-soft);
  font-weight: 600;
}

.site-footer__powered a:hover {
  color: #f0d48a;
  text-decoration: underline;
}

.site-footer__cue {
  color: #fff;
  font-weight: 500;
}

.site-footer__engine {
  color: var(--gold-soft, #e8c872);
  font-weight: 600;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Primary CTA — Cameroon Green + thin Gold border */
.btn--primary {
  background: var(--green);
  color: #fff;
  border-color: var(--gold);
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn--primary:hover:not(:disabled) {
  background: var(--green-hover);
  border-color: var(--gold);
}

.btn--primary:active:not(:disabled) {
  background: var(--green-active);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  min-height: 40px;
  font-weight: 500;
  font-size: 0.875rem;
}

.btn--ghost:hover:not(:disabled) {
  color: var(--gold-soft);
  background: rgba(232, 200, 114, 0.06);
}

/* Secondary / back CTA — locked vocabulary: Retro */
.btn--retro {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-neutral);
  min-height: 44px;
}

.btn--retro:hover:not(:disabled) {
  color: var(--gold-soft);
  border-color: var(--gold-dim);
  background: rgba(232, 200, 114, 0.06);
}

/*
 * ═══════════════════════════════════════════════════════
 * GLOBAL FORM CONTROLS — gold lining theme (Sign-in standard)
 * Applies automatically on every page that loads styles.css
 *
 * Text / date / tel / number / select / textarea:
 *   wrap in .field > .field__panel > .field__input
 * File drop / camera chips:
 *   use .upload-zone (same gold focus rules)
 * Bare controls (if needed):
 *   add class .form-control
 * ═══════════════════════════════════════════════════════
 */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.field[hidden] {
  display: none !important;
}

.field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Panel shell = phone field / OTP-adjacent chrome */
.field__panel {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__panel:hover {
  border-color: var(--border-neutral-strong);
}

/* Gold lining + soft gold ring on focus (locked Sign-in behaviour) */
.field__panel:focus-within {
  border-color: var(--gold);
  box-shadow: var(--focus-ring-soft);
}

.field__panel--error,
.field__panel--error:focus-within {
  border-color: var(--error);
  box-shadow: 0 0 0 2px rgba(232, 90, 107, 0.2);
}

.field__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border-neutral);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  user-select: none;
}

.field__panel:focus-within .field__prefix {
  border-right-color: var(--gold-dim);
  color: var(--gold-muted);
}

.field__input,
.field__panel select.field__input,
.field__panel textarea.field__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.02em;
  -webkit-appearance: none;
  appearance: none;
}

/*
 * CSE-theme <select> (Champ d'action, Depuis, ID type, sex, …)
 * Kill Android/WebKit native grey chrome; gold caret + dark options.
 */
.field__panel select.field__input {
  cursor: pointer;
  color: var(--text);
  background-color: transparent;
  /* dual chevron → single gold caret (CSE) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23e8c872' d='M1.1 1.2 L6 6.1 L10.9 1.2' stroke='%23e8c872' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.65rem center;
  background-size: 0.7rem 0.45rem;
  background-repeat: no-repeat;
  padding-right: 1.85rem;
  color-scheme: dark;
  /* Android often paints white/grey native select without these */
  -webkit-text-fill-color: var(--text);
  border-radius: 0;
}

/* Empty / placeholder option (value="") reads muted like input placeholders */
.field__panel select.field__input:invalid,
.field__panel select.field__input.is-placeholder {
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
}

.field__panel select.field__input:focus {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.field__panel select.field__input option {
  background: #101410;
  color: #f2f2f2;
  font-weight: 500;
}

.field__panel select.field__input option:disabled,
.field__panel select.field__input option[value=""] {
  color: #8a8a8a;
}

.field__input::placeholder {
  color: var(--text-dim);
  letter-spacing: normal;
}

.field__input:focus {
  outline: none;
}

.field__hint {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.field__error {
  font-size: 0.7rem;
  color: var(--error);
  min-height: 0;
}

.field__error:empty {
  display: none;
}

/*
 * Bare form control (same gold theme when not using .field__panel)
 * Use for one-off inputs on future screens.
 */
.form-control {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:hover {
  border-color: var(--border-neutral-strong);
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: var(--focus-ring-soft);
}

/* File / camera upload chips — same gold lining language as text fields */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 110px;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-neutral);
  background: var(--bg-elevated);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.upload-zone:hover,
.upload-zone:focus-within {
  border-color: var(--gold);
  border-style: solid;
  box-shadow: var(--focus-ring-soft);
}

/* After upload: image fills chip; labels/icons hidden */
.upload-zone.has-file {
  border-style: solid;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(232, 200, 114, 0.2);
  padding: 0;
  cursor: default;
}

.upload-zone.has-file .upload-zone__placeholder {
  display: none;
}

/* Edit player: prior ID kept without a new photo blob — show check + label */
.upload-zone.has-file--kept {
  padding: 0.55rem;
  cursor: pointer;
  background: rgba(26, 122, 76, 0.14);
  border-color: rgba(26, 122, 76, 0.65);
  border-style: solid;
}

.upload-zone.has-file--kept .upload-zone__placeholder {
  display: flex;
}

.upload-zone.has-file--kept .upload-zone__preview {
  display: none !important;
}

.upload-zone.has-file--kept .upload-zone__input {
  pointer-events: auto;
  z-index: 3;
}

.upload-zone.has-file--kept .upload-zone__icon {
  color: var(--green-hover);
  font-size: 1.35rem;
}

.upload-zone.has-file--kept .upload-zone__title {
  color: var(--gold-soft);
  font-weight: 700;
}

.upload-zone.has-file--kept .upload-zone__hint {
  color: var(--text-muted);
  max-width: 9.5rem;
}

.upload-zone__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  pointer-events: none;
  z-index: 1;
}

.upload-zone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  border: 0;
  padding: 0;
  margin: 0;
}

/* Don't open file picker again when tapping a filled preview — use delete first */
.upload-zone.has-file .upload-zone__input {
  pointer-events: none;
}

.upload-zone__icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.upload-zone__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-muted);
}

.upload-zone__hint {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.upload-zone__name {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone__preview {
  display: none;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: inherit;
}

.upload-zone.has-file .upload-zone__preview {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Remove image → back to default labels */
.upload-zone__delete {
  display: none;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 4;
  width: 1.65rem;
  height: 1.65rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.upload-zone.has-file .upload-zone__delete {
  display: flex;
}

.upload-zone__delete:hover {
  background: var(--red);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Required field missing (same language as Sign-in errors) */
.upload-zone.upload-zone--error {
  border-color: var(--error);
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(232, 90, 107, 0.2);
}

.upload-zone.upload-zone--error:hover,
.upload-zone.upload-zone--error:focus-within {
  border-color: var(--error);
  box-shadow: 0 0 0 2px rgba(232, 90, 107, 0.25);
}

/* ── Language switch (under primary CTA, centered) ─── */
.lang-switch-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.15rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.lang-switch__btn {
  min-width: 2.15rem;
  padding: 0.28rem 0.55rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lang-switch__btn:hover {
  color: var(--text-muted);
}

.lang-switch__btn.is-active {
  background: rgba(26, 122, 76, 0.4);
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(232, 200, 114, 0.35);
}

.lang-switch__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ── Utility ───────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/*
 * GLOBAL mobile keyboard assist (site-shell.js → body.em-keyboard-open)
 * Class is set only while the soft keyboard is actually visible (viewport drop),
 * and cleared when the keyboard dismisses — even if the field keeps focus (Android).
 *
 * 1) Hide primary CTAs while keyboard up — stops mis-taps
 * 2) Scroll room via .kyc-scroll::after
 * 3) Combo lists open above the field
 */
body.em-keyboard-open .kyc-sticky-footer,
body.em-keyboard-open .club-footer-actions,
body.em-keyboard-open .em-actions--kyc,
body.em-keyboard-open .role-sticky-footer,
body.em-keyboard-open .auth-card__form > .btn--primary,
body.em-keyboard-open .em-modal__panel > .btn--primary,
body.em-keyboard-open .em-modal__actions {
  /* Keep layout slot collapsed cleanly; class must clear on keyboard hide */
  display: none !important;
}

body.em-keyboard-open .kyc-scroll {
  padding-bottom: 0.5rem;
  scroll-padding-bottom: 2rem;
}

/* Scroll tail only while keyboard is up (clears with class — no permanent distortion) */
body.em-keyboard-open .kyc-scroll::after {
  height: min(42vh, 18rem);
}

/* Do NOT shrink max-height of the card on keyboard — that left empty holes after dismiss */
body.em-keyboard-open .auth {
  padding-bottom: min(36vh, 14rem);
}

/* Combo lists always open BELOW the field (never flip above under sticky headers) */
body.em-keyboard-open .combo__list {
  top: calc(100% + 4px);
  bottom: auto;
  max-height: min(28vh, 10rem);
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), var(--focus-ring-soft);
}

body.em-keyboard-open .em-modal__panel {
  max-height: min(92dvh, 100%);
  overflow-y: auto;
  padding-bottom: 1rem;
}

@media (max-width: 900px), (pointer: coarse) {
  .kyc-scroll {
    scroll-padding-bottom: 5.5rem;
    scroll-padding-top: 0.75rem;
  }

  .page-club .kyc-scroll,
  .page-kyc .kyc-scroll {
    padding-bottom: 1.1rem;
  }

  .page-club .kyc-sticky-footer,
  .page-kyc .kyc-sticky-footer {
    padding-top: 0.75rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  }

  .page-club .club-footer-actions .btn--primary,
  .page-kyc .em-actions--kyc .btn--primary,
  .auth-card__form > .btn--primary {
    min-height: 48px;
  }
}

/* ── Home page (uses shared .site-brand) ────────────── */
.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0 1.25rem;
  gap: 1rem;
}

.home-hero__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 32ch;
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
  margin-top: 0.25rem;
}

/* ── Tablet+ ───────────────────────────────────────── */
@media (min-width: 480px) {
  .page {
    padding: 1rem 1.5rem 0;
  }

  .site-brand {
    gap: 0.45rem;
    margin-bottom: calc(1.75rem + 6px);
  }

  .site-brand__logo,
  .site-brand__logo-fallback {
    width: 112px;
    height: 112px;
  }

  .site-brand__org {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .site-footer {
    padding: 1rem 1.5rem 0.9rem;
  }

  .site-footer__name {
    font-size: 0.78rem;
  }

  .site-footer__address {
    font-size: 0.68rem;
  }
}

/* Shared wait overlay — async screen transitions (login, later membres). */
.fecabi-wait-host {
  position: relative;
}
.fecabi-wait {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1.2rem;
  background: rgba(10, 18, 14, 0.92);
  text-align: center;
  pointer-events: auto;
}
.fecabi-wait[hidden] {
  display: none !important;
}
body.fecabi-wait-open {
  cursor: wait;
}
body.fecabi-wait-open .auth-card__form,
body.fecabi-wait-open .btn--primary,
body.fecabi-wait-open .btn--google {
  pointer-events: none;
}
.fecabi-wait__title {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fecabi-wait__sub {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}
.fecabi-wait__sub[hidden] {
  display: none !important;
}
.fecabi-wait__track {
  width: 100%;
  max-width: 16rem;
  height: 0.42rem;
  border-radius: 99px;
  background: rgba(232, 200, 114, 0.18);
  overflow: hidden;
}
.fecabi-wait__bar {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1a7a4c, #e8c872);
  animation: fecabi-wait-indeterminate 1.15s ease-in-out infinite;
}
.fecabi-wait__step {
  margin: 0.7rem 0 0;
  color: #e8c872;
  font-size: 0.76rem;
  font-weight: 600;
}
@keyframes fecabi-wait-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
