/* ============================================================
   Qadr — App mobile · thème sombre, esprit Apple
   On construit étape par étape. Pour l'instant : l'écran d'auth.
   ============================================================ */

:root {
  --bg: #0a0b0f;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --surface-3: #232733;
  --text: #f4f6f9;
  --text-dim: #8a8f9c;
  --text-faint: #5c606b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #18e08a;
  --accent-2: #16c2d6;
  --grad: linear-gradient(135deg, #18e08a 0%, #16c2d6 100%);
  --danger: #ff5d6c;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* App en butée sur les 4 coins : html/body verrouillés en fixed,
   Safari ne peut plus faire flotter/rebondir la page — seuls les
   scrollers internes (profil, sheets, inbox…) bougent. */
html, body {
  margin: 0; padding: 0;
  position: fixed; top: 0; left: 0; right: 0; width: 100%;
  height: 100%;
  height: 100dvh; /* hauteur dynamique : colle au bas réel de l'écran, barre Safari ou pas */
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}
body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
#app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}
.hidden { display: none !important; }

/* ── Écran d'authentification ── */
.auth-screen {
  position: absolute; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
}
.auth-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; }
.auth-logo { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; align-self: center; margin-bottom: 14px; background: var(--surface-2); }
.auth-title { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; text-align: center; margin: 0; }
.auth-sub { font-size: 15px; color: var(--text-dim); text-align: center; margin: 6px 0 28px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field label { font-size: 13px; font-weight: 600; color: var(--text-dim); padding-left: 2px; }
.auth-field input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-size: 16px; padding: 15px 16px;
  font-family: inherit; outline: none; transition: border-color 0.18s ease;
}
.auth-field input::placeholder { color: var(--text-faint); }
.auth-field input:focus { border-color: var(--accent); }
.auth-btn {
  margin-top: 8px; width: 100%; padding: 16px; border: none; border-radius: var(--r-md);
  background: var(--grad); color: #04140d; font-size: 16.5px; font-weight: 700;
  font-family: inherit; transition: transform 0.14s ease, opacity 0.2s ease;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.5; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 4px; }
.auth-link { background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; padding: 4px; }
.auth-msg { text-align: center; font-size: 13.5px; margin-top: 14px; min-height: 18px; }
.auth-msg.error { color: var(--danger); }
.auth-msg.ok { color: var(--accent); }

/* ── App : écrans sous la barre d'onglets ── */
.app-shell { position: absolute; inset: 0; z-index: 10; background: var(--bg); }
.screen { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.screen.active { opacity: 1; pointer-events: auto; }
#screen-carte { background: #03040a; }
/* ── Barre de recherche (glass Apple, s'élargit au clic) ── */
.qsearch { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 14px; right: 14px; z-index: 600; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.qsearch > * { pointer-events: auto; }
.qsearch-bar { display: flex; align-items: center; gap: 8px; height: 46px; width: 46px; padding: 0 12px; border-radius: 23px; background: rgba(18, 20, 28, 0.55); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.16); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.42); cursor: pointer; overflow: hidden; transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.qsearch.active .qsearch-bar { width: 100%; flex: 1; cursor: text; }
.qsearch-btn { flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qsearch-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qsearch-input { flex: 1; min-width: 0; width: 0; opacity: 0; border: 0; background: none; outline: none; font-family: inherit; font-size: 15px; color: var(--text); transition: opacity 0.28s ease 0.08s; }
.qsearch-input::placeholder { color: var(--text-faint); }
.qsearch.active .qsearch-input { opacity: 1; }
.qsearch-filter { flex: 0 0 auto; width: 0; height: 46px; border-radius: 23px; padding: 0; overflow: hidden; background: rgba(18, 20, 28, 0.55); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 0 solid rgba(255, 255, 255, 0.16); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.42); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transform: scale(0.6); pointer-events: none; transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.3s ease; }
.qsearch.active .qsearch-filter { width: 46px; border-width: 0.5px; opacity: 1; transform: scale(1); pointer-events: auto; }
.qsearch-filter svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qsearch-filter:active, .qsearch-btn:active { transform: scale(0.9); }

/* ── Panneau Filtres (bottom sheet glass) ── */
.filter-overlay { position: absolute; inset: 0; z-index: 1650; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 5, 9, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.filter-overlay.open { opacity: 1; pointer-events: auto; }
.filter-card { width: 100%; max-width: 480px; max-height: 82dvh; overflow-y: auto; touch-action: pan-y; background: rgba(14, 16, 24, 0.78); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.5); padding: 8px 18px calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.filter-overlay.open .filter-card { transform: translateY(0); }
.filter-grab { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); margin: 4px auto 12px; }
.filter-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.filter-title { font-size: 19px; font-weight: 800; color: #fff; flex: 1; }
.filter-reset { border: 0; background: none; color: var(--accent); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px; }
.filter-close { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); color: var(--text-dim); font-size: 12px; cursor: pointer; flex: 0 0 auto; }
.filter-block { margin-bottom: 18px; }
.ftype { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.08); }
.ftype-opt { flex: 1; padding: 10px 6px; border: 0; border-radius: 10px; background: none; color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s, color 0.2s; }
.ftype-opt.active { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); }
.ftype-opt:active { transform: scale(0.97); }
.filter-label { font-size: 13px; font-weight: 700; color: var(--text); }
.filter-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.filter-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.filter-km { font-size: 14px; font-weight: 800; color: var(--accent); }
.filter-sport-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 8px; padding: 13px 15px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.1); color: var(--text-dim); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.filter-sport-btn.set { color: var(--text); border-color: rgba(24, 224, 138, 0.4); }
.filter-chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.filter-chip { padding: 9px 14px; border-radius: 12px; border: 0.5px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.filter-chip.active { background: var(--accent); color: #04140d; border-color: var(--accent); }
.filter-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-toggle { flex: 0 0 auto; width: 50px; height: 30px; border-radius: 15px; border: 0; background: rgba(255, 255, 255, 0.12); position: relative; cursor: pointer; transition: background 0.25s; }
.filter-toggle.on { background: var(--accent); }
.filter-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: left 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.filter-toggle.on .filter-knob { left: 23px; }
/* Slider distance façon exposure */
.expo { position: relative; padding: 14px 4px 4px; }
.expo-track { position: relative; height: 40px; cursor: pointer; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.expo-notches { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.expo-notch { display: block; width: 2px; height: 20px; border-radius: 1px; background: var(--accent); transform-origin: center; opacity: 0.25; transition: opacity 0.12s, transform 0.12s; }
.expo-thumb { position: absolute; top: 50%; left: 0; width: 4px; height: 30px; border-radius: 3px; background: #fff; box-shadow: 0 0 12px rgba(24, 224, 138, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%); pointer-events: none; }
.filter-apply { width: 100%; margin-top: 4px; padding: 15px; border: 0; border-radius: 15px; background: var(--accent); color: #04140d; font-family: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 20px rgba(24, 224, 138, 0.35); }
.filter-apply:active { transform: scale(0.98); }
#qadr-stars { display: none; }
/* Ciel réel : panorama Voie lactée (ESO/S. Brunier, CC BY 4.0 — même image que Google Earth).
   Légère dérive + zoom très lents pour que le ciel semble vivant derrière le globe. */
#screen-carte::before {
  content: ''; position: absolute; inset: -8%; z-index: 0;
  background: url('../img/milkyway.jpg') center / cover no-repeat;
  animation: skyDrift 140s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes skyDrift {
  from { transform: translate3d(-1.2%, -0.8%, 0) scale(1); }
  to   { transform: translate3d(1.2%, 0.8%, 0) scale(1.07); }
}
#qadr-map { position: absolute; inset: 0; background: transparent; z-index: 1; }
.maplibregl-map, .maplibregl-canvas { background: transparent !important; }
.screen-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; color: var(--text-dim); padding: 24px;
}
.screen-ph .ph-emoji { font-size: 40px; }
#profil-pseudo { color: var(--accent); }
.leaflet-control-attribution { display: none; }
/* Déconnexion : texte rouge discret (façon iOS), plus de gros bouton gris */
.logout-btn {
  margin-top: 26px; padding: 13px 24px; border-radius: var(--r-md);
  background: none; border: 0; color: var(--danger); opacity: 0.85;
  font-size: 15px; font-weight: 600; font-family: inherit;
  transition: transform 0.14s ease, background 0.18s ease, opacity 0.18s ease;
}
.logout-btn:active { transform: scale(0.97); background: rgba(255, 93, 108, 0.1); opacity: 1; }

/* ── Barre d'onglets · Liquid Glass (style Apple iOS 26) ──
   FLOTTANTE, en retrait des bords, capsule arrondie, arête lumineuse + ombre.
   (Le vrai verre "bloomera" quand il y aura du contenu derrière — la carte.) */
.tabbar {
  position: absolute; left: 12px; right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 210; height: 60px;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  padding: 0 8px;
}
.tab {
  flex: 1; position: relative; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; color: var(--text-dim); font-family: inherit; padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.22s ease, transform 0.12s ease;
}
/* Le press ne rétrécit que l'icône (comme iOS), pas le label */
.tab:active .tab-ic { transform: scale(0.86); }
/* highlight "verre" derrière l'onglet sélectionné */
.tab::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6);
  width: 56px; height: 44px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.22);
  opacity: 0; transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.tab.active::before { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tab-ic { position: relative; z-index: 1; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; transition: transform 0.12s ease; }
.tab-ic svg { width: 26px; height: 26px; transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1); }
.tab-lbl { position: relative; z-index: 1; font-size: 10.5px; font-weight: 600; letter-spacing: -0.01em; }
.tab.active { color: var(--accent); }
.tab.active .tab-ic svg { transform: scale(1.04); }

/* Bouton central = logo (créer), intégré dans la capsule */
.tab-center { flex: 0 0 60px; }
.tab-center::before { display: none; }
.tab-center-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(24, 224, 138, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.tab-center:active .tab-center-btn { transform: scale(0.9); }
.tab-center-btn img { width: 26px; height: 26px; object-fit: contain; }

/* ── Feuille "Créer une session" · bottom sheet style Apple ── */
.sheet-overlay {
  position: absolute; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px;
  background: rgba(24, 26, 34, 0.72);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border-radius: 26px 26px 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-overlay.open .sheet { transform: none; }
.sheet-grab { width: 38px; height: 5px; border-radius: 99px; background: var(--surface-3); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-cancel { background: none; border: none; color: var(--accent); font-size: 16px; font-family: inherit; cursor: pointer; padding: 4px 0; }
.sheet-head-sp { width: 56px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-dim); padding-left: 2px; }
/* font-size 16px = pas de zoom auto iOS au focus */
.field input {
  width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md); color: var(--text); font-size: 16px; padding: 15px 16px;
  font-family: inherit; outline: none; transition: border-color 0.18s ease;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus { border-color: var(--accent); }
.field input[type="datetime-local"] { color-scheme: dark; }

/* Bouton compact "Choisis ton sport" */
.picker-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  color: var(--text); font-size: 16px; font-family: inherit; padding: 15px 16px; cursor: pointer;
  transition: border-color 0.18s ease;
}
.picker-btn:active { border-color: var(--accent); }
.picker-btn.placeholder #cs-sport-label { color: var(--text-faint); }
.picker-chev { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }

/* Sélecteur de sport plein écran (flou, façon multi-step loader) */
.sport-picker {
  position: absolute; inset: 0; z-index: 1800;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8, 9, 13, 0.35);
  backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
  opacity: 0; pointer-events: none; transition: opacity 0.34s ease;
}
.sport-picker.open { opacity: 1; pointer-events: auto; }
.sp-close {
  position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08);
  border: none; color: var(--text); font-size: 17px; cursor: pointer;
}
.sp-head { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.sp-list { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 320px; }
.sp-row {
  display: flex; align-items: center; gap: 15px; width: 100%; padding: 14px 16px;
  background: transparent; border: none; color: var(--text); font-family: inherit;
  font-size: 21px; font-weight: 600; cursor: pointer; opacity: 0.45; transform: scale(0.97);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1), color 0.3s ease;
}
.sp-row.active { opacity: 1; transform: scale(1); color: var(--accent); }
.sp-name { flex: 1; text-align: left; }
.sp-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; position: relative;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: background 0.32s cubic-bezier(0.2, 0.9, 0.2, 1), border-color 0.3s ease, transform 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.sp-check::after {
  content: ''; position: absolute; left: 7px; top: 3.5px; width: 5.5px; height: 10px;
  border: solid #04140d; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.sp-row.active .sp-check { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.sp-row.active .sp-check::after { transform: rotate(45deg) scale(1); }
.sp-other {
  width: 100%; max-width: 320px; margin-top: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); color: var(--text); font-size: 16px; padding: 14px 16px; outline: none;
}
.sp-other::placeholder { color: var(--text-faint); }
.sp-confirm {
  margin-top: 28px; padding: 15px 44px; border: none; border-radius: var(--r-md);
  background: var(--grad); color: #04140d; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.sp-confirm:active { transform: scale(0.97); }

/* Switch coulissant Ouverte / Privée (curseur qui glisse) */
.seg-slide {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px; padding: 4px;
}
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 10px; background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.seg-slide[data-active="private"] .seg-thumb { transform: translateX(100%); }
.seg-opt {
  position: relative; z-index: 1; background: none; border: none;
  color: var(--text-dim); font-size: 15px; font-weight: 600; padding: 12px; font-family: inherit; cursor: pointer;
  transition: color 0.25s ease;
}
.seg-opt.active { color: var(--text); }

.stepper { display: flex; align-items: center; gap: 18px; }
.stepper button {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text); font-size: 22px; font-family: inherit; cursor: pointer;
}
.stepper button:active { transform: scale(0.92); }
.stepper-val { font-size: 20px; font-weight: 700; min-width: 36px; text-align: center; }

.sheet-msg { text-align: center; font-size: 13.5px; margin-top: 12px; min-height: 16px; }
.sheet-msg.error { color: var(--danger); }
.sheet-msg.ok { color: var(--accent); }

/* ── Multi-step loader (création de session) · style smoothui/Apple ── */
.msl-overlay {
  position: absolute; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 9, 13, 0.5);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.msl-overlay.open { opacity: 1; pointer-events: auto; }
.msl-wrap {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  transform: translateY(10px); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
.msl-overlay.open .msl-wrap { transform: translateY(0); opacity: 1; }

.msl-steps { display: flex; flex-direction: column; gap: 24px; padding: 0 6px; }
.msl-step {
  display: flex; align-items: center; gap: 15px;
  opacity: 0.32; transition: opacity 0.45s ease;
}
.msl-step.active { opacity: 1; }
.msl-step.done { opacity: 0.78; }

.msl-ic {
  position: relative; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.msl-step.active .msl-ic { border-color: rgba(24, 224, 138, 0.5); }
.msl-step.done .msl-ic { border-color: var(--accent); background: var(--accent); }
.msl-step.error .msl-ic { border-color: #ff5a5a; background: transparent; }

.msl-spin {
  position: absolute; inset: -1.5px; border-radius: 50%;
  border: 1.5px solid transparent; border-top-color: var(--accent);
  opacity: 0; animation: mslSpin 0.7s linear infinite;
}
.msl-step.active .msl-spin { opacity: 1; }

.msl-check { width: 15px; height: 15px; opacity: 0; }
.msl-check path {
  fill: none; stroke: #04140d; stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
}
.msl-step.done .msl-check { opacity: 1; }
.msl-step.done .msl-check path { animation: mslDraw 0.42s ease 0.05s forwards; }

.msl-txt { font-size: 17px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.msl-step.done .msl-txt { color: rgba(255, 255, 255, 0.68); }
.msl-step.error .msl-txt { color: #ff8a8a; }

.msl-err {
  margin: 10px 0 0 49px; color: #ff8a8a; font-size: 13px; min-height: 16px;
  opacity: 0; transition: opacity 0.3s ease; max-width: 260px;
}
.msl-err.show { opacity: 1; }

@keyframes mslSpin { to { transform: rotate(360deg); } }
@keyframes mslDraw { to { stroke-dashoffset: 0; } }

/* ── Pins de session sur la carte ── */
.qpin-wrap { background: none; border: 0; }
.qpin {
  display: block; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10, 12, 18, 0.88);
  border: 2px solid var(--qc, #18e08a);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  position: relative;
}
.qpin::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--qc, #18e08a); opacity: 0.5;
  animation: qpulse 2.6s ease-out infinite;
}
.qpin::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px; border-radius: 50%; background: var(--qc, #18e08a);
  box-shadow: 0 0 8px var(--qc, #18e08a);
}
@keyframes qpulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(1.85); opacity: 0; }
  100% { transform: scale(1.85); opacity: 0; }
}

/* ── Bouton "afficher les terrains libres" (verre, à droite sous la recherche) ── */
.courts-toggle {
  display: none !important; /* terrains libres désactivés pour l'instant (données prêtes dans js/qadr-courts.js) */
  position: absolute; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 72px);
  z-index: 590; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18, 20, 28, 0.55);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s ease, background 0.25s ease, transform 0.12s ease;
}
.courts-toggle svg { width: 21px; height: 21px; fill: currentColor; }
.courts-toggle:active { transform: scale(0.9); }
.courts-toggle.on { background: var(--accent); color: #04140d; border-color: var(--accent); box-shadow: 0 6px 20px rgba(24, 224, 138, 0.4); }

/* ── Terrains en accès libre : pin discret (petit point mat, sans pulse) ── */
.tl-pin {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--qc, #18e08a); opacity: 0.35;
  border: 1.5px solid rgba(10, 12, 18, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1; /* toujours SOUS les pins de sessions et complexes */
}
.tl-pin:hover, .tl-pin:active { opacity: 1; transform: scale(1.35); }
/* Les popups passent TOUJOURS au-dessus de tous les pins */
.maplibregl-popup { z-index: 10; }
.tlpop-create {
  display: block; width: 100%; text-align: center; margin-top: 10px; padding: 10px;
  border: 0; border-radius: 11px; background: var(--accent); color: #04140d;
  font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 14px rgba(24, 224, 138, 0.3);
}
.tlpop-create:active { transform: scale(0.98); }

/* ── Popup de session (verre sombre, esprit Apple) ── */
.maplibregl-popup-content {
  background: rgba(22, 24, 32, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--text); border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  padding: 12px 15px; font-family: inherit; line-height: 1.35;
}
.maplibregl-popup-tip { display: none; }
.maplibregl-popup-close-button { display: none; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none !important; }
/* ── Suggestions d'adresses (géocodage) ── */
.geo-drop { display: none; margin-top: 6px; border-radius: 14px; overflow: hidden; background: rgba(22, 24, 32, 0.92); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); }
.geo-drop.open { display: block; }
.qsearch-drop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 601; }
.geo-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 11px 13px; border: 0; background: none; color: var(--text); font-family: inherit; font-size: 13px; cursor: pointer; border-bottom: 0.5px solid rgba(255, 255, 255, 0.06); }
.geo-opt:last-child { border-bottom: 0; }
.geo-opt:active { background: rgba(255, 255, 255, 0.07); }
.geo-ic { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.geo-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ── Popup : sport (gauche) + copier & logo Maps vert (haut-droite) ── */
.qpop { position: relative; }
.qpop-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qpop-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.qpop-copy { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px 5px 6px; border-radius: 8px; border: 0.5px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-family: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.qpop-copy-ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qpop-copy:active, .qpop-maps:active { transform: scale(0.94); }
.qpop-maps { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; border: 0.5px solid rgba(24, 224, 138, 0.3); background: rgba(24, 224, 138, 0.12); cursor: pointer; text-decoration: none; }
.qpop-maps-ic { width: 18px; height: 18px; }
.qpop-maps-ic path { fill: var(--accent); }
.qpop-maps-ic circle { fill: #0c1016; }
/* Point posé sur la carte quand on choisit une adresse recherchée */
.geo-searchpin { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(24, 224, 138, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5); }
.geo-searchpin::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(24, 224, 138, 0.55); animation: geo-pulse 1.6s ease-out infinite; }
@keyframes geo-pulse { 0% { transform: scale(0.5); opacity: 0.85; } 100% { transform: scale(1.7); opacity: 0; } }
/* ── Bannière : placer un point sur la carte ── */
.mappick { position: absolute; left: 14px; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 74px); z-index: 1660; display: flex; justify-content: center; opacity: 0; pointer-events: none; transform: translateY(-14px); transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.mappick.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mappick-card { width: 100%; max-width: 460px; background: rgba(14, 16, 24, 0.78); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); border-radius: 18px; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5); padding: 14px 16px; }
.mappick-title { font-size: 15px; font-weight: 800; color: #fff; }
.mappick-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; min-height: 32px; line-height: 1.35; }
.mappick-btns { display: flex; gap: 10px; margin-top: 12px; }
.mappick-cancel { flex: 0 0 auto; padding: 10px 16px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: var(--text-dim); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mappick-ok { flex: 1; padding: 11px; border: 0; border-radius: 12px; background: var(--accent); color: #04140d; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 16px rgba(24, 224, 138, 0.35); }
.mappick-ok:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.mappick-ok:active:not(:disabled), .mappick-cancel:active { transform: scale(0.97); }

/* ── Complexes : marqueur, popup, bouton admin, formulaire ── */
.cxpin { width: 34px; height: 34px; border-radius: 10px; background: rgba(18, 20, 28, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1.5px solid var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.cxpin img { width: 100%; height: 100%; object-fit: cover; }
.cxpin span { font-size: 18px; }
.cxpop { min-width: 200px; }
.cxpop-photo { width: 100%; height: 96px; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 10px; }
.cxpop-gallery { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 10px; border-radius: 12px; scrollbar-width: none; }
.cxpop-gallery::-webkit-scrollbar { display: none; }
.cxpop-shot { flex: 0 0 100%; height: 104px; border-radius: 12px; background-size: cover; background-position: center; scroll-snap-align: start; }
.cxpop-head { display: flex; align-items: center; gap: 9px; }
.cxpop-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; background: rgba(255, 255, 255, 0.06); }
.cxpop-name { font-size: 16px; font-weight: 800; color: #fff; line-height: 1.15; }
.cxpop-sports { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 6px; }
.cxpop-tel { color: var(--text); text-decoration: none; }
.cxpop-book { display: block; text-align: center; margin-top: 11px; padding: 11px; border-radius: 12px; background: var(--accent); color: #04140d; font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 4px 16px rgba(24, 224, 138, 0.35); }
.cxpop-book:active { transform: scale(0.98); }
.cxpop-edit { display: block; width: 100%; text-align: center; margin-top: 8px; padding: 9px; border-radius: 11px; border: 0.5px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: var(--text-dim); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cxpop-edit:active { transform: scale(0.98); }
.cx-fab { position: absolute; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); z-index: 620; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: #04140d; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 8px 26px rgba(24, 224, 138, 0.45); display: none; align-items: center; justify-content: center; }
.cx-fab.show { display: flex; }
.cx-fab:active { transform: scale(0.94); }
.cx-sports { display: flex; flex-wrap: wrap; gap: 7px; }
.cx-sport { padding: 8px 12px; border-radius: 11px; border: 0.5px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.15s; }
.cx-sport.on { background: var(--accent); color: #04140d; border-color: var(--accent); }
.cx-uploads { display: flex; gap: 12px; }
.cx-up { flex: 1; min-width: 0; }
.cx-up-btn { width: 100%; margin-top: 6px; padding: 12px; border-radius: 12px; border: 0.5px dashed rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.04); color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-up-btn:active { transform: scale(0.98); }
/* Formulaire complexe : plus grand */
#complexe-sheet .sheet { max-width: 560px; max-height: 96vh; overflow-y: auto; }
.cx-addphotos { border-style: solid; color: var(--accent); border-color: rgba(24, 224, 138, 0.35); }
/* Aperçu des photos (slide horizontal) */
.cx-photos-preview { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.cx-photos-preview:empty { display: none; }
.cx-photos-preview::-webkit-scrollbar { display: none; }
.cx-thumb { position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 12px; background-size: cover; background-position: center; border: 0.5px solid rgba(255, 255, 255, 0.12); }
.cx-thumb-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(8, 9, 13, 0.75); color: #fff; font-size: 11px; line-height: 20px; text-align: center; cursor: pointer; padding: 0; }
/* Popup complexe : adresse + copie + Maps sur une ligne */
.cxpop-addr { gap: 6px; }
.cxpop-addr-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cxpop-mini { flex: 0 0 auto; padding: 0; }
.qpop-copy.cxpop-mini { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.qpop-maps.cxpop-mini { width: 26px; height: 26px; border-radius: 8px; }
.qpop-maps.cxpop-mini .qpop-maps-ic { width: 15px; height: 15px; }
.cxpop-mini .qpop-copy-ic { width: 13px; height: 13px; }
/* Note + étoiles dans la popup complexe */
.cxpop-rating { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.cxpop-stars { letter-spacing: 1px; font-size: 13px; }
.cxstar { color: rgba(255, 255, 255, 0.22); }
.cxstar.on { color: #f5c542; }
.cxpop-rval { font-size: 13px; font-weight: 800; color: #fff; }
.cxpop-rcount { font-size: 11.5px; color: var(--text-dim); }
.cxpop-reviews { display: inline-block; margin-top: 8px; padding: 8px 12px; border-radius: 10px; border: 0.5px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cxpop-reviews:active { transform: scale(0.97); }
/* Formulaire : note + avis */
.cx-rating-row { display: flex; gap: 12px; }
.cx-rating-cell { flex: 1; min-width: 0; }
.cx-reviews { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.cx-reviews:empty { display: none; }
.cx-review { border: 0.5px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 10px; background: rgba(255, 255, 255, 0.03); }
.cx-review-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cx-rv-author { flex: 1; min-width: 0; }
.cx-rv-author, .cx-rv-text { background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 14px; padding: 8px 10px; outline: none; }
.cx-rv-text { width: 100%; resize: none; box-sizing: border-box; }
.cx-rv-stars { flex: 0 0 auto; background: rgba(255, 255, 255, 0.06); color: var(--text); border: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 7px; font-family: inherit; }
.cx-rv-x { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--text-dim); cursor: pointer; }
.cx-addreview { color: var(--accent); border-color: rgba(24, 224, 138, 0.3); border-style: solid; }
#cx-hours { width: 100%; box-sizing: border-box; resize: vertical; background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.4; padding: 10px 12px; outline: none; }
.cxpop-hours { align-items: flex-start; }
.cxpop-hours span { white-space: pre-line; }
.cxpop-hours .qpop-ic { margin-top: 2px; }
/* Carrousel d'avis (façon smoothui) */
.rc-overlay { position: absolute; inset: 0; z-index: 1900; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 5, 9, 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.rc-overlay.open { opacity: 1; pointer-events: auto; }
.rc-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 14px; cursor: pointer; }
.rc-title { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.rc-stack { position: relative; width: min(88vw, 380px); height: 240px; }
.rc-card { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 24px; border-radius: 22px; background: rgba(18, 20, 28, 0.85); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, filter 0.4s ease; }
.rc-stars { font-size: 16px; letter-spacing: 2px; }
.rc-star { color: rgba(255, 255, 255, 0.2); }
.rc-star.on { color: #f5c542; }
.rc-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); font-style: italic; overflow-y: auto; max-height: 130px; }
.rc-author { font-size: 13px; font-weight: 800; color: #fff; }
.rc-nav { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.rc-arrow { width: 42px; height: 42px; border-radius: 50%; border: 0.5px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 20px; cursor: pointer; }
.rc-arrow:disabled { opacity: 0.3; cursor: default; }
.rc-arrow:active:not(:disabled) { transform: scale(0.92); }
.rc-dots { display: flex; gap: 7px; }
.rc-dot { width: 7px; height: 7px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.25); cursor: pointer; padding: 0; transition: 0.2s; }
.rc-dot.on { background: var(--accent); width: 20px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .rc-card { transition: none; } }
.qpop-sport { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.qpop-title { font-size: 16px; font-weight: 700; margin-top: 2px; color: #fff; }
.qpop-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); margin-top: 5px; }
.qpop-ic { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qpop-spots { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); margin-top: 9px; font-weight: 600; }
.qpop-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.qpop-who { margin-top: 10px; padding-top: 9px; border-top: 0.5px solid rgba(255, 255, 255, 0.1); }
.qpop-who-head { font-size: 10px; font-weight: 800; letter-spacing: 0.07em; color: var(--text-faint); text-transform: uppercase; }
.qpop-who-names { font-size: 12.5px; color: var(--text); margin-top: 3px; }
.qpop-join {
  position: relative; display: block; width: 100%; margin-top: 11px; padding: 10px 12px;
  border: 0; border-radius: 11px; font-family: inherit; font-size: 14px; font-weight: 700;
  color: #04140d; background: var(--accent); cursor: pointer; isolation: isolate; overflow: hidden;
  box-shadow: 0 4px 14px rgba(24, 224, 138, 0.3);
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.1s ease;
}
.qpop-join:active { transform: scale(0.97); }
/* Rejoindre : fond noir + bordure "LED" animée qui tourne */
.qpop-join.rejoin { color: #fff; background: #0a0b0f; box-shadow: 0 0 16px rgba(24, 224, 138, 0.25); }
.qpop-join.rejoin::before {
  content: ''; position: absolute; z-index: -2; left: 50%; top: 50%;
  width: 260%; height: 260%; transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0 228deg, #16c2d6 288deg, #34f5c5 330deg, #18e08a 352deg, transparent 360deg);
  animation: ledspin 2.6s linear infinite; transition: opacity 0.3s ease;
}
.qpop-join.rejoin::after {
  content: ''; position: absolute; z-index: -1; inset: 1.6px;
  background: #0a0b0f; border-radius: 9.4px; transition: opacity 0.3s ease;
}
/* Validé → tout le bouton devient vert, la LED s'efface */
.qpop-join.ok { color: #04140d; background: var(--accent); box-shadow: 0 4px 16px rgba(24, 224, 138, 0.45); animation: qpopOk 0.5s ease; }
.qpop-join.ok::before, .qpop-join.ok::after { opacity: 0; }
.qpop-join.joined { background: rgba(24, 224, 138, 0.14); color: var(--accent); box-shadow: none; }
.qpop-join.full { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); box-shadow: none; cursor: default; }
.qpop-check { display: block; width: 20px; height: 20px; margin: 0 auto; }
.qpop-check path { fill: none; stroke: #04140d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: qpopDraw 0.4s ease 0.05s forwards; }
@keyframes qpopOk { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes qpopDraw { to { stroke-dashoffset: 0; } }
@keyframes ledspin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ── Panneau de session + mini-chat (verre Apple, cadre qui s'agrandit) ── */
/* Une seule couche de verre : l'overlay assombrit, la carte floute. */
.ss-overlay {
  position: absolute; inset: 0; z-index: 1600;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(8, 9, 13, 0.62);
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.ss-overlay.open { opacity: 1; pointer-events: auto; }
.ss-card {
  position: relative; width: min(94%, 380px);
  background: rgba(24, 26, 34, 0.82);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.16); border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 20px 18px 16px; display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.92) translateY(-8px); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.ss-overlay.open .ss-card { transform: scale(1) translateY(0); opacity: 1; }
.ss-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.08); color: var(--text-dim);
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ss-close:active { transform: scale(0.9); }
.ss-sport { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.ss-title { font-size: 19px; font-weight: 800; color: #fff; margin-top: 2px; letter-spacing: -0.01em; }
.ss-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.ss-status { display: inline-block; margin-top: 9px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 9px; }
.ss-status.upcoming { background: rgba(24, 224, 138, 0.14); color: var(--accent); }
.ss-status.live { background: rgba(245, 166, 35, 0.18); color: #f5a623; }
.ss-status.finished { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.ss-actions:not(:empty) { margin-top: 12px; }
.ss-go { display: block; width: 100%; padding: 12px; border: 0; border-radius: 13px; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; background: var(--accent); color: #04140d; box-shadow: 0 4px 16px rgba(24, 224, 138, 0.35); transition: transform 0.1s ease; }
.ss-go:active { transform: scale(0.98); }
.ss-go.end { background: #f5a623; box-shadow: 0 4px 16px rgba(245, 166, 35, 0.35); }
.ss-go.rate { background: #f5c542; box-shadow: 0 4px 16px rgba(245, 197, 66, 0.35); }
.ss-go.go-led { position: relative; overflow: hidden; isolation: isolate; background: #0a0b0f; color: #fff; box-shadow: 0 0 16px rgba(24, 224, 138, 0.28); }
.go-text { position: relative; z-index: 2; font-size: 18px; font-weight: 800; letter-spacing: 0.16em; }
.ss-go.go-led::before {
  content: ''; position: absolute; z-index: -2; left: 50%; top: 50%;
  width: 260%; height: 260%; transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0 228deg, #16c2d6 288deg, #34f5c5 330deg, #18e08a 352deg, transparent 360deg);
  animation: ledspin 2.6s linear infinite;
}
.ss-go.go-led::after { content: ''; position: absolute; z-index: -1; inset: 2px; background: #0a0b0f; border-radius: 11px; }

/* Dépliage en grid-rows : anime vers la vraie hauteur du contenu (pas un max-height arbitraire) */
.ss-body {
  display: grid; grid-template-rows: 0fr; min-height: 0;
  opacity: 0; overflow: hidden;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease 0.1s;
}
.ss-card.expanded .ss-body { grid-template-rows: 1fr; opacity: 1; }
.ss-body-in { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

.ss-messages {
  flex: 1 1 auto; min-height: 180px; max-height: 44vh; overflow-y: auto;
  margin-top: 14px; padding: 4px 2px; display: flex; flex-direction: column; gap: 9px;
}
.ss-empty { margin: auto; color: var(--text-faint); font-size: 13px; text-align: center; padding: 24px 10px; }
.ss-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.ss-msg.mine { align-self: flex-end; align-items: flex-end; }
.ss-author { font-size: 10.5px; color: var(--text-faint); margin: 0 0 2px 10px; font-weight: 600; border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; position: relative; }
.ss-author::after { content: ''; position: absolute; inset: -8px; }
.ss-author:active { color: var(--accent); }
.ss-bubble {
  padding: 8px 13px; border-radius: 16px; font-size: 14px; line-height: 1.35; color: var(--text);
  background: rgba(255, 255, 255, 0.07); border-bottom-left-radius: 5px;
}
.ss-msg.mine .ss-bubble {
  background: var(--accent); color: #04140d; font-weight: 500;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.ss-inputbar { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.ss-inputbar input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text); font-family: inherit; font-size: 16px; outline: none;
}
.ss-inputbar input::placeholder { color: var(--text-faint); }
.ss-send {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.12s ease;
}
.ss-send svg { width: 20px; height: 20px; }
.ss-send svg path {
  fill: none; stroke: var(--text-dim); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.25s ease;
}
.ss-send.active {
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(24, 224, 138, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.ss-send.active svg path { stroke: #04140d; }
.ss-send:active { transform: scale(0.88); }

/* ── Écran profil ── */
.profile {
  position: relative; height: 100%; overflow-y: auto; overflow-x: hidden; max-width: 420px; margin: 0 auto;
  padding: calc(46px + env(safe-area-inset-top, 0px)) 22px 120px;
  display: flex; flex-direction: column; align-items: center;
}
/* Hero : la Voie lactée fond dans le noir derrière l'avatar (même ciel que la carte) */
.profile::before {
  content: ''; position: absolute; top: 0; left: -22px; right: -22px; height: 250px;
  background: url('../img/milkyway.jpg') center 38% / cover no-repeat;
  opacity: 0.5; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 25%, transparent 100%);
  mask-image: linear-gradient(#000 25%, transparent 100%);
}
.profile > * { flex-shrink: 0; position: relative; }
/* Anneau de progression XP autour de l'avatar (se remplit avec le niveau) */
@property --xp { syntax: '<number>'; inherits: true; initial-value: 0; }
.pf-avatar-wrap { position: relative; --xp: 0; transition: --xp 1s cubic-bezier(0.22, 1, 0.36, 1); }
.pf-avatar-wrap::before {
  content: ''; position: absolute; inset: -7px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--xp) * 1% * 0.6), #16c2d6 calc(var(--xp) * 1%), rgba(255, 255, 255, 0.09) calc(var(--xp) * 1%));
  filter: drop-shadow(0 0 10px rgba(24, 224, 138, 0.35));
}
.pf-avatar {
  position: relative; z-index: 1;
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #16c2d6);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: #04140d;
  box-shadow: 0 0 0 4px var(--bg);
}
.pf-lvl-pill {
  position: absolute; left: -6px; bottom: -2px; z-index: 2;
  padding: 3px 8px; border-radius: 9px;
  background: #0e1016; border: 1px solid rgba(24, 224, 138, 0.55);
  color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.pf-xp-line { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; text-align: center; }
/* Chips des sports pratiqués */
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 12px; }
.pf-chips:empty { display: none; }
.pf-chip { padding: 5px 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.1); font-size: 12.5px; font-weight: 700; color: var(--text); }
/* Vitrine des trophées (scroll horizontal) : gagnés dorés, à débloquer grisés */
.pf-trophies { display: flex; gap: 14px; width: 100%; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.pf-trophies::-webkit-scrollbar { display: none; }
.pf-tro { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pf-tro-e {
  position: relative; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  background: radial-gradient(circle at 30% 25%, rgba(245, 197, 66, 0.18), rgba(255, 255, 255, 0.04) 70%);
  border: 1.5px solid rgba(245, 197, 66, 0.55);
  box-shadow: 0 0 16px -4px rgba(245, 197, 66, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.pf-tro-n {
  position: absolute; right: -5px; bottom: -3px; padding: 1px 6px; border-radius: 8px;
  background: #f5c542; color: #1a1405; font-size: 10px; font-weight: 800;
  border: 2px solid var(--bg);
}
.pf-tro-l { font-size: 10px; font-weight: 600; color: var(--text-dim); text-align: center; line-height: 1.2; max-width: 66px; }
.pf-tro.locked .pf-tro-e { filter: grayscale(1); opacity: 0.38; border-color: rgba(255, 255, 255, 0.18); box-shadow: none; background: rgba(255, 255, 255, 0.04); }
.pf-tro.locked .pf-tro-l { color: var(--text-faint); }
/* ── Carte joueur (façon FIFA) : OVR gradé + radar hexagonal ── */
.pf-cards { display: flex; gap: 12px; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: none; }
.pf-cards::-webkit-scrollbar { display: none; }
.pcard-empty { width: 100%; font-size: 13px; color: var(--text-faint); text-align: center; padding: 26px 20px; line-height: 1.5; }
.pcard {
  position: relative; flex: 0 0 100%; scroll-snap-align: center;
  border-radius: 20px; padding: 16px 14px 12px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 60%);
  border: 1px solid var(--pc, rgba(255, 255, 255, 0.12));
  box-shadow: 0 0 24px -8px var(--pc, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.pcard.bronze { --pc: rgba(224, 133, 47, 0.55); --pt: #e0852f; }
.pcard.silver { --pc: rgba(170, 178, 192, 0.5); --pt: #c8cfda; }
.pcard.gold { --pc: rgba(245, 197, 66, 0.6); --pt: #f5c542; }
.pcard.legend { --pc: rgba(180, 107, 255, 0.65); --pt: #c08bff; animation: legendPulse 2.4s ease-in-out infinite; }
@keyframes legendPulse {
  0%, 100% { box-shadow: 0 0 24px -6px rgba(180, 107, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
  50% { box-shadow: 0 0 38px -2px rgba(180, 107, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
}
.pcard-top { display: flex; align-items: center; gap: 12px; }
.pcard-ovr {
  font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -0.03em;
  color: var(--pt); text-shadow: 0 0 22px var(--pc);
}
.pcard-sport { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: #fff; }
.pcard-se { font-size: 22px; }
.pcard-tierlbl { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--pt); padding: 4px 10px; border-radius: 9px; border: 1px solid var(--pc); }
.pcard-radar { display: block; width: min(100%, 270px); margin: 4px auto 0; }
.rd-grid { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.rd-data { fill: var(--pt); fill-opacity: 0.22; stroke: var(--pt); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 8px var(--pc)); }
.rd-dot { fill: var(--pt); }
.rd-anim { transform-box: view-box; transform-origin: center; animation: rdIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rdIn { from { transform: scale(0.1); opacity: 0; } }
.rd-lbl { fill: var(--text-dim); font-size: 9.5px; font-weight: 700; text-anchor: middle; text-transform: uppercase; letter-spacing: 0.04em; }
.pcard-foot { font-size: 10.5px; color: var(--text-faint); text-align: center; margin-top: 6px; }

/* ── Inviter des joueurs dans sa session ── */
.ip-list { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 340px; max-height: 55dvh; overflow-y: auto; }
.ip-empty { font-size: 13.5px; color: var(--text-dim); text-align: center; padding: 30px 16px; }
.ip-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px;
  border-radius: 15px; background: rgba(255, 255, 255, 0.05); border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.ip-row.busy { opacity: 0.5; pointer-events: none; }
.ip-row.added { border-color: rgba(24, 224, 138, 0.4); background: rgba(24, 224, 138, 0.07); pointer-events: none; }
.ip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ip-name { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-together { font-size: 11px; font-weight: 700; color: #f5c542; }
.ip-row.fav { border-color: rgba(245, 197, 66, 0.3); }
.ip-add { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--accent); }
.ss-invite {
  display: block; width: 100%; margin-top: 9px; padding: 11px;
  border: 0.5px solid rgba(24, 224, 138, 0.35); border-radius: 12px;
  background: rgba(24, 224, 138, 0.08); color: var(--accent);
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.ss-invite:active { transform: scale(0.98); }

/* ── Fiche joueur publique ── */
.pp-sheet { max-height: 88dvh; }
.pp-head { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.pp-av {
  width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), #16c2d6);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #04140d;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.pp-ttl { flex: 1; min-width: 0; }
.pp-name { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.pp-me { font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(24, 224, 138, 0.12); padding: 2px 8px; border-radius: 8px; vertical-align: middle; }
.pp-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.pp-pager { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--text-faint); background: rgba(255, 255, 255, 0.05); padding: 4px 10px; border-radius: 10px; }
/* Le cadre unique : bio + stats + OVR */
.pp-frame {
  width: 100%; margin-top: 14px; padding: 14px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.pp-bio { font-size: 13px; color: rgba(255, 255, 255, 0.8); font-style: italic; line-height: 1.45; text-align: center; }
.pp-nobio { color: var(--text-faint); }
.pp-stats { display: flex; margin-top: 13px; padding-top: 13px; border-top: 0.5px solid rgba(255, 255, 255, 0.08); }
.pp-st { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.pp-st + .pp-st { border-left: 1px solid rgba(255, 255, 255, 0.08); }
.pp-st b { font-size: 19px; font-weight: 800; color: #fff; }
.pp-st span { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.pp-ovrs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 0.5px solid rgba(255, 255, 255, 0.08); }
.pp-ovr {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px;
  font-size: 13px; border: 1px solid var(--pc); color: var(--text);
  background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 14px -6px var(--pc);
}
.pp-ovr b { font-size: 16px; font-weight: 900; color: var(--pt); text-shadow: 0 0 10px var(--pc); }
.pp-ovr.bronze { --pc: rgba(224, 133, 47, 0.55); --pt: #e0852f; }
.pp-ovr.silver { --pc: rgba(170, 178, 192, 0.5); --pt: #c8cfda; }
.pp-ovr.gold { --pc: rgba(245, 197, 66, 0.6); --pt: #f5c542; }
.pp-ovr.legend { --pc: rgba(180, 107, 255, 0.65); --pt: #c08bff; }
.pp-sec { font-size: 13px; font-weight: 700; color: var(--text); margin: 18px 2px 10px; }
.pp-tros { padding-bottom: 4px; }
.pp-legend { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--text-dim); margin-top: 4px; }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; }
.pp-dot.them { background: var(--pt); box-shadow: 0 0 6px var(--pc); }
.pp-dot.mine { background: var(--accent); box-shadow: 0 0 6px rgba(24, 224, 138, 0.5); margin-left: 8px; }
/* Mon radar superposé : vert, en pointillés pour le distinguer */
.rd-mine { fill: rgba(24, 224, 138, 0.1); stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linejoin: round; }
.ss-mem { cursor: pointer; }

/* Graphe d'activité : barres lumineuses qui poussent en cascade */
.pf-activity { display: flex; gap: 9px; width: 100%; align-items: flex-end; height: 118px; padding: 0 4px; }
.act-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.act-val { font-size: 10px; font-weight: 700; color: var(--accent); min-height: 13px; line-height: 13px; }
.act-track { position: relative; flex: 1; width: 13px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); display: flex; align-items: flex-end; }
.act-col.now .act-track { background: rgba(24, 224, 138, 0.09); box-shadow: inset 0 0 0 1px rgba(24, 224, 138, 0.22); }
.act-bar {
  display: block; width: 100%; height: var(--h); border-radius: 7px;
  background: linear-gradient(180deg, #34f5c5, var(--accent));
  box-shadow: 0 0 14px rgba(24, 224, 138, 0.4);
  transform-origin: bottom;
  animation: actGrow 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 60ms);
}
@keyframes actGrow { from { transform: scaleY(0); } }
.act-lbl { font-size: 9.5px; color: var(--text-faint); min-height: 12px; white-space: nowrap; }
.pf-avatar.has-img span { display: none; }
.pf-cam {
  position: absolute; right: -2px; bottom: -2px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center; color: #04140d; cursor: pointer;
}
.pf-cam svg { width: 16px; height: 16px; }
.pf-cam:active { transform: scale(0.92); }
.pf-name { font-size: 25px; font-weight: 800; color: #fff; margin-top: 16px; letter-spacing: -0.02em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6); }
.pf-sub { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
/* Stats façon Apple Fitness : grands chiffres lumineux, filets, pas de boîtes */
.pf-stats { display: flex; width: 100%; margin-top: 26px; }
.pf-stat { flex: 1; padding: 2px 4px; text-align: center; }
.pf-stat + .pf-stat { border-left: 1px solid rgba(255, 255, 255, 0.09); }
.pf-stat-n {
  font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
  background: linear-gradient(160deg, #ffffff 20%, #8df1cd 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pf-stat-l { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
/* Bio en citation centrée sous le nom */
.pf-bio { display: flex; align-items: flex-start; justify-content: center; gap: 8px; width: 100%; max-width: 300px; margin-top: 12px; }
.pf-bio-text { flex: 0 1 auto; font-size: 13px; color: rgba(255, 255, 255, 0.82); line-height: 1.45; text-align: center; font-style: italic; }
.pf-bio-text.empty { color: var(--text-faint); }
.pf-bio-edit { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-size: 12px; cursor: pointer; }
.pf-bio-edit:active { transform: scale(0.9); }
.pf-bio-editor { width: 100%; margin-top: 12px; }
.pf-bio-editor textarea { width: 100%; resize: none; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text); font-family: inherit; font-size: 16px; padding: 10px 12px; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.pf-bio-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pf-bio-row button { padding: 7px 14px; border-radius: 10px; border: 0; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pf-bio-cancel { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.pf-bio-save { background: var(--accent); color: #04140d; }
.pf-hist-head { margin-top: 26px; }
.pf-history { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ph-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 14px 0; }
.ph-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }
.ph-row .ph-emoji {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1;
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--sc, var(--accent));
  box-shadow: 0 0 10px -3px var(--sc, var(--accent));
}
.ph-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-title { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.ph-status { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 9px; background: rgba(24, 224, 138, 0.14); color: var(--accent); }
.ph-status.past { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }
.ph-status.podium { background: rgba(245, 197, 66, 0.16); color: #f5c542; }
.ph-row.clickable { cursor: pointer; transition: background 0.18s, border-color 0.18s, transform 0.1s; }
.ph-row.clickable:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(245, 197, 66, 0.22); }
.ph-row.clickable:active { transform: scale(0.985); }
.pf-sec-head { display: flex; align-items: baseline; justify-content: space-between; width: 100%; margin: 26px 2px 12px; }
.pf-sec-head > span:first-child { font-size: 14px; font-weight: 700; color: var(--text); }
.pf-soon { font-size: 11px; color: var(--text-faint); background: rgba(255, 255, 255, 0.05); padding: 3px 9px; border-radius: 10px; }
/* Sélecteur de sport — bulle verre Apple avec flèches */
/* Sélecteur de sport des badges : discret, il ne vole plus la vedette à la grille */
.pf-bubble {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; margin: 0 0 12px; padding: 4px 6px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pf-arw {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: none; color: var(--text-dim); font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.15s;
}
.pf-arw:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.1); color: #fff; }
.pf-sel { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pf-se { font-size: 20px; }
.pf-sn { font-size: 14.5px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }

/* Badges — cartes riches compactes (cadre + palier + jauge), rangées de 3 */
.pf-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; min-height: 100px; }
/* Carte badge épurée : emoji (héros) + nom + jauge. Le détail vit dans la popup.
   Apparition en cascade quand l'onglet s'ouvre. */
.bdg {
  position: relative; display: block; text-align: center; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; padding: 24px 8px 12px; cursor: pointer; font-family: inherit; transition: transform 0.12s ease;
  animation: bdgIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes bdgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bdg:active { transform: scale(0.97); }
.bdg.max { border-color: rgba(245, 197, 66, 0.4); background: rgba(245, 197, 66, 0.06); }
.bdg-tier { position: absolute; top: 6px; right: 6px; font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: var(--tc); line-height: 1.2; }
.bdg.soon .bdg-tier { color: var(--text-dim); }
.bdg-emoji { display: block; font-size: 31px; line-height: 1; margin-bottom: 7px; }
.bdg.locked .bdg-emoji, .bdg.soon .bdg-emoji { filter: grayscale(1) opacity(0.45); }
.bdg-name { display: block; font-size: 11.5px; font-weight: 700; color: var(--text); line-height: 1.15; }
.bdg.locked .bdg-name, .bdg.soon .bdg-name { color: var(--text-dim); }
.bdg-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); margin: 9px 4px 0; overflow: hidden; }
.bdg-bar span { display: block; height: 100%; border-radius: 2px; background: var(--tc); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }

/* Détail d'un badge (au tap) */
.bd-overlay { position: absolute; inset: 0; z-index: 1650; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(8, 9, 13, 0.66); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.bd-overlay.open { opacity: 1; pointer-events: auto; }
.bd-card { position: relative; width: min(90%, 320px); background: rgba(24, 26, 34, 0.85); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.16); border-radius: 24px; padding: 28px 22px 22px; text-align: center; transform: scale(0.94); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.bd-overlay.open .bd-card { transform: scale(1); }
.bd-close { position: absolute; top: 13px; right: 13px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); color: var(--text-dim); font-size: 13px; cursor: pointer; }
.bd-ic { font-size: 50px; line-height: 1; margin-bottom: 12px; }
.bd-tier { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: var(--tc); }
.bd-name { font-size: 20px; font-weight: 800; color: #fff; margin-top: 10px; }
.bd-desc { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.bd-val { font-size: 22px; font-weight: 800; color: var(--text); margin-top: 14px; }
.bd-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); margin: 10px 6px 0; overflow: hidden; }
.bd-bar span { display: block; height: 100%; border-radius: 4px; background: var(--tc); }
.bd-foot { font-size: 12px; color: var(--text-faint); margin-top: 10px; }
.bd-tiers { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.bd-pip { font-size: 10.5px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); color: var(--text-faint); border: 1px solid rgba(255, 255, 255, 0.06); }
.bd-pip.reached { color: var(--tc); border-color: var(--tc); }

/* ── Vote de fin de match ── */
.vote-overlay { position: absolute; inset: 0; z-index: 1700; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 5, 9, 0.52); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.vote-overlay.open { opacity: 1; pointer-events: auto; }
.vote-card { width: min(94%, 380px); max-height: 86vh; background: rgba(12, 14, 22, 0.78); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 0.5px rgba(255,255,255,0.07); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.94); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.vote-overlay.open .vote-card { transform: scale(1); }
.vote-head { padding: 20px 18px 12px; text-align: center; border-bottom: 0.5px solid rgba(255, 255, 255, 0.08); flex: 0 0 auto; }
.vote-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); }
.vote-title { font-size: 18px; font-weight: 800; color: #fff; margin-top: 3px; }
.vote-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.vote-awards { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; scrollbar-width: none; }
.vote-awards::-webkit-scrollbar { display: none; }
.vaw-players { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.vaw-players::-webkit-scrollbar { display: none; }
.vote-empty { color: var(--text-faint); font-size: 13px; text-align: center; padding: 30px 10px; }
.vaw { margin-bottom: 16px; }
.vaw-t { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.vaw-em { font-size: 16px; }
.vpl { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-family: inherit; padding: 0; }
.vpl-av { position: relative; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: #04140d; background: linear-gradient(135deg, var(--accent), #16c2d6); border: 2px solid transparent; transition: 0.15s; }
.vpl.gold .vpl-av { border-color: #f5c542; box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.28); }
.vpl.gold .vpl-av::after { content: '🥇'; position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; background: #14161d; font-size: 11px; line-height: 19px; text-align: center; border: 1.5px solid #14161d; }
.vpl.silver .vpl-av { border-color: #aab2c0; box-shadow: 0 0 0 3px rgba(170, 178, 192, 0.22); }
.vpl.silver .vpl-av::after { content: '🥈'; position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; background: #14161d; font-size: 11px; line-height: 19px; text-align: center; border: 1.5px solid #14161d; }
.vpl.bronze .vpl-av { border-color: #e0852f; box-shadow: 0 0 0 3px rgba(224, 133, 47, 0.22); }
.vpl.bronze .vpl-av::after { content: '🥉'; position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; background: #14161d; font-size: 11px; line-height: 19px; text-align: center; border: 1.5px solid #14161d; }
.vpl-nm { font-size: 11px; color: var(--text-dim); font-weight: 600; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vpl.gold .vpl-nm { color: #f5c542; }
.vpl.silver .vpl-nm { color: #aab2c0; }
.vpl.bronze .vpl-nm { color: #e0852f; }
.vaw-slots { display: flex; gap: 6px; margin-bottom: 10px; }
.vaw-slot { display: flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); border: 0.5px solid rgba(255, 255, 255, 0.07); flex: 1; min-width: 0; transition: background 0.2s, border-color 0.2s; }
.vaw-slot-icon { font-size: 12px; flex: 0 0 auto; }
.vaw-slot-nm { font-size: 10px; color: var(--text-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.vaw-slot.filled .vaw-slot-nm { color: var(--text); }
.vaw-slot[data-r="1"].filled { border-color: rgba(245, 197, 66, 0.35); background: rgba(245, 197, 66, 0.07); }
.vaw-slot[data-r="2"].filled { border-color: rgba(170, 178, 192, 0.28); background: rgba(170, 178, 192, 0.05); }
.vaw-slot[data-r="3"].filled { border-color: rgba(224, 133, 47, 0.28); background: rgba(224, 133, 47, 0.05); }
.vote-foot { flex: 0 0 auto; padding: 10px 16px 16px; border-top: 0.5px solid rgba(255, 255, 255, 0.08); }
.vote-msg { font-size: 12.5px; color: var(--accent); text-align: center; min-height: 16px; margin-bottom: 8px; }
.vote-btns { display: flex; gap: 10px; align-items: center; }
.vote-skip { flex: 0 0 auto; padding: 12px 16px; border: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.06); color: var(--text-dim); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.vote-validate { flex: 1; padding: 13px; border: 0; border-radius: 13px; background: var(--accent); color: #04140d; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 16px rgba(24, 224, 138, 0.35); }
.vote-validate:active, .vote-skip:active { transform: scale(0.97); }
.vote-validate:disabled { opacity: 0.6; cursor: default; }
.vote-card.submitted { animation: vote-exit 0.55s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes vote-exit {
  0%   { transform: scale(1); opacity: 1; }
  35%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(0.86); opacity: 0; }
}
@keyframes palm-entry {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Palmarès (podium des votes) ── */
.palm-overlay { position: absolute; inset: 0; z-index: 1750; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 5, 9, 0.52); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.palm-overlay.open { opacity: 1; pointer-events: auto; }
.palm-card { position: relative; width: min(94%, 400px); max-height: 86vh; background: rgba(12, 14, 22, 0.78); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 0.5px solid rgba(255, 255, 255, 0.14); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 0.5px rgba(255,255,255,0.07); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.94); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.palm-overlay.open .palm-card { transform: scale(1); }
.palm-close { position: absolute; top: 13px; right: 13px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); color: var(--text-dim); font-size: 13px; cursor: pointer; z-index: 2; }
.palm-head { padding: 22px 18px 12px; text-align: center; border-bottom: 0.5px solid rgba(255, 255, 255, 0.08); flex: 0 0 auto; }
.palm-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: #f5c542; }
.palm-title { font-size: 18px; font-weight: 800; color: #fff; margin-top: 3px; }
.palm-awards { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; scrollbar-width: none; }
.palm-awards::-webkit-scrollbar { display: none; }
.palm-none { color: var(--text-faint); font-size: 12px; padding: 6px 2px; }
.palm-aw { margin-bottom: 0; padding-bottom: 16px; border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.palm-aw:last-child { border-bottom: none; padding-bottom: 4px; }
.palm-aw-t { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.palm-em { font-size: 16px; }
.palm-podium { display: flex; justify-content: space-around; align-items: flex-start; gap: 8px; }
.palm-pl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.palm-av { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; color: #fff; background: rgba(255, 255, 255, 0.06); border: 2px solid var(--rc); box-shadow: 0 0 16px -2px var(--rc); }
.palm-crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 18px; z-index: 2; }
.palm-nm { font-size: 11px; color: var(--text); font-weight: 600; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.palm-rk { font-size: 9px; font-weight: 800; letter-spacing: 0.05em; }
/* ── MVP Toast ── */
.mvp-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.72); z-index: 3500; display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(18, 20, 28, 0.94); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 1px solid rgba(245, 197, 66, 0.28); border-radius: 26px; padding: 28px 44px 24px; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 0 60px rgba(245, 197, 66, 0.15), 0 24px 60px rgba(0,0,0,0.7); }
.mvp-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mvp-toast-flame { font-size: 52px; animation: flame-pulse 0.65s ease-in-out infinite alternate; }
@keyframes flame-pulse { from { transform: scale(1) rotate(-4deg); } to { transform: scale(1.18) rotate(4deg); } }
.mvp-toast-label { font-size: 38px; font-weight: 900; letter-spacing: 0.1em; color: #f5c542; text-shadow: 0 0 28px rgba(245, 197, 66, 0.55); margin-top: 2px; }
.mvp-toast-name { font-size: 17px; font-weight: 700; color: rgba(255,255,255,0.85); margin-top: 2px; }

.profile .logout-btn { margin-top: 30px; width: 100%; max-width: 280px; }
.pf-msg { font-size: 12.5px; color: var(--text-dim); margin-top: 12px; min-height: 16px; text-align: center; }

/* ============================================================
   Passe "native feel" iPhone
   ============================================================ */

/* ── Zones tactiles ≥ 44pt : petit visuel, grande cible (pseudo-élément) ── */
.ss-close, .bd-close, .palm-close, .filter-close, .rc-close, .sp-close,
.pf-bio-edit, .cx-thumb-x, .cx-rv-x, .qpop-copy, .qpop-maps, .rc-dot,
.sheet-cancel, .auth-link, .filter-reset { position: relative; }
.ss-close::after, .bd-close::after, .palm-close::after, .filter-close::after,
.rc-close::after, .sp-close::after, .pf-bio-edit::after, .cx-thumb-x::after,
.cx-rv-x::after, .sheet-cancel::after, .auth-link::after, .filter-reset::after {
  content: ''; position: absolute; inset: -9px;
}
.qpop-copy::before, .qpop-maps::before { content: ''; position: absolute; inset: -8px; }
.rc-dot::after { content: ''; position: absolute; inset: -14px -8px; }

/* ── Bottom sheets : état de drag (le doigt pilote, pas la transition) ── */
.sheet { touch-action: pan-y; }
.sheet.dragging, .filter-card.dragging { transition: none !important; }
.sheet-overlay.dragging, .filter-overlay.dragging { transition: none !important; }

/* ── Carrousel d'avis : suivi du doigt ── */
.rc-stack { touch-action: pan-y; }
.rc-card.dragging { transition: none !important; }

/* ── Auth : œil mot de passe + spinner sur bouton occupé ── */
.auth-pass-wrap { position: relative; display: flex; }
.auth-pass-wrap input { flex: 1; padding-right: 50px; }
.auth-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: none; color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color 0.2s ease;
}
.auth-eye svg { width: 20px; height: 20px; }
.auth-eye.on { color: var(--accent); }
.auth-btn { position: relative; }
.auth-btn:disabled { color: transparent; }
.auth-btn:disabled::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2.5px solid rgba(4, 20, 13, 0.25); border-top-color: #04140d;
  animation: mslSpin 0.7s linear infinite;
}

/* ── Attribution OSM (obligation de licence, discrète) ── */
.map-attrib {
  position: absolute; left: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  z-index: 5; font-size: 10px; color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); pointer-events: auto;
}
.map-attrib a { color: inherit; text-decoration: none; }

/* ── Les ✕ redondants sont masqués (fermeture = tap à côté ou swipe retour).
   On les garde dans le DOM : le geste retour les "clique" pour fermer proprement. ── */
.ss-close, .bd-close, .sp-close { display: none; }

/* ── Fiche complexe (bottom sheet premium) ── */
.cxf-sheet { max-height: 88dvh; }
.cxf-hero {
  display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 6px -18px 0; height: 200px; scrollbar-width: none;
}
.cxf-hero::-webkit-scrollbar { display: none; }
.cxf-shot { flex: 0 0 100%; background-size: cover; background-position: center; scroll-snap-align: start; }
.cxf-head { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.cxf-logo { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; border: 0.5px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); }
.cxf-ttl { flex: 1; min-width: 0; }
.cxf-name { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -0.01em; line-height: 1.15; }
.cxf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cxf-chip { padding: 3px 9px; border-radius: 9px; background: rgba(24, 224, 138, 0.1); border: 0.5px solid rgba(24, 224, 138, 0.3); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.cxf-rating {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px;
  padding: 12px 14px; border-radius: 14px; border: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04); font-family: inherit; cursor: pointer; color: var(--text);
}
.cxf-rating:active { transform: scale(0.985); }
.cxf-rval { font-size: 15px; font-weight: 800; color: #fff; }
.cxf-rcount { font-size: 12.5px; color: var(--text-dim); }
.cxf-rgo { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }
.cxf-rows { margin-top: 6px; }
.cxf-row {
  display: flex; align-items: center; gap: 11px; padding: 13px 2px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  color: var(--text); font-size: 14px; text-decoration: none;
}
.cxf-row:last-child { border-bottom: 0; }
.cxf-ic { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cxf-row-txt { flex: 1; min-width: 0; line-height: 1.4; }
.cxf-hours { white-space: pre-line; }
.cxf-row .cxf-ic { align-self: flex-start; margin-top: 2px; }
.cxf-tel:active { opacity: 0.7; }
.cxf-book {
  display: block; text-align: center; margin-top: 12px; padding: 15px;
  border-radius: 15px; background: var(--grad); color: #04140d;
  font-size: 16px; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 20px rgba(24, 224, 138, 0.35);
  transition: transform 0.12s ease;
}
.cxf-book:active { transform: scale(0.98); }
.cxf-edit {
  display: block; width: 100%; margin-top: 10px; padding: 11px;
  border: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ── Panneau session : avatars des inscrits + quitter/annuler ── */
.ss-members { display: flex; margin-top: 10px; }
.ss-members:empty { display: none; }
.ss-mem {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #04140d;
  background: linear-gradient(135deg, var(--accent), #16c2d6);
  border: 2px solid rgba(24, 26, 34, 0.95);
  margin-left: -7px;
}
.ss-mem:first-child { margin-left: 0; }
.ss-mem.more { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); font-size: 11px; }
.ss-leave {
  display: block; width: 100%; margin-top: 9px; padding: 10px;
  border: 0; border-radius: 12px; background: none;
  color: var(--danger); opacity: 0.75; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.2s ease, opacity 0.2s ease;
}
.ss-leave.confirm { background: rgba(255, 93, 108, 0.12); opacity: 1; font-weight: 700; }
.ss-leave:active { opacity: 1; }

/* ── Écran Amis : classement de tous les joueurs ── */
.lb {
  position: absolute; inset: 0; overflow-y: auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(env(safe-area-inset-bottom, 0px) + 100px);
  max-width: 480px; margin: 0 auto;
}
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb-title { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.lb-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.lb-invite { flex: 0 0 auto; padding: 9px 16px; border: 0; border-radius: 13px; background: var(--grad); color: #04140d; font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(24, 224, 138, 0.3); }
.lb-invite:active { transform: scale(0.96); }
.lb-tabs { display: flex; gap: 7px; margin: 16px 0 14px; overflow-x: auto; scrollbar-width: none; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 12px; border: 0.5px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.lb-tab.active { background: var(--accent); color: #04140d; border-color: var(--accent); }
.lb-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}
.lb-row:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.07); }
.lb-row.top1 { border-color: rgba(245, 197, 66, 0.4); background: rgba(245, 197, 66, 0.05); }
.lb-row.top2 { border-color: rgba(170, 178, 192, 0.3); }
.lb-row.top3 { border-color: rgba(224, 133, 47, 0.3); }
.lb-rank { flex: 0 0 26px; text-align: center; font-size: 15px; font-weight: 800; color: var(--text-dim); }
.lb-av {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #16c2d6);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #04140d;
}
.lb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-lvl { font-size: 11.5px; color: var(--text-dim); }
.lb-xp { flex: 0 0 auto; font-size: 12px; color: var(--text-dim); }
.lb-xp b { font-size: 16px; font-weight: 800; color: #fff; }
.et-msg { font-size: 13px; color: var(--accent); margin-top: 4px; min-height: 18px; text-align: center; }

/* ── Écran Messages : boîte de réception des chats de session ── */
.inbox {
  position: absolute; inset: 0; overflow-y: auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(env(safe-area-inset-bottom, 0px) + 100px);
  max-width: 480px; margin: 0 auto;
}
.inbox-head { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.inbox-sub { font-size: 13px; color: var(--text-dim); margin: 4px 0 16px; }
.inbox-empty { font-size: 14px; color: var(--text-faint); text-align: center; padding: 44px 20px; line-height: 1.5; }
.inbox-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 12px; margin-bottom: 8px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}
.inbox-row:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.07); }
.inbox-av {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--sc, var(--accent));
  box-shadow: 0 0 12px -4px var(--sc, var(--accent));
}
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inbox-title { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-time { flex: 0 0 auto; font-size: 11px; color: var(--text-faint); }
.inbox-preview { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-preview.none { color: var(--text-faint); font-style: italic; }
.inbox-st { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 8px; }
.inbox-st.upcoming { background: rgba(24, 224, 138, 0.14); color: var(--accent); }
.inbox-st.live { background: rgba(245, 166, 35, 0.18); color: #f5a623; }
.inbox-st.finished { background: rgba(255, 255, 255, 0.07); color: var(--text-dim); }

/* ── Accessibilité : on coupe le décoratif si l'utilisateur le demande ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════════════════
   Onboarding première connexion — tes sports, à découvrir, ta ville
   ════════════════════════════════════════════════════════════ */
#onboard {
  position: fixed; inset: 0; z-index: 4000; display: none; flex-direction: column;
  background: radial-gradient(120% 90% at 50% -10%, #171a24 0%, var(--bg) 62%);
  color: var(--text);
  padding: calc(env(safe-area-inset-top, 0px) + 30px) 22px calc(env(safe-area-inset-bottom, 0px) + 26px);
}
#onboard.open { display: flex; }
#onboard.closing { animation: ob-fade-out 0.6s ease forwards; }
@keyframes ob-fade-out { to { opacity: 0; } }

.ob-step { display: none; flex: 1; flex-direction: column; justify-content: center; width: 100%; max-width: 420px; margin: 0 auto; }
.ob-step.on { display: flex; animation: ob-in 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes ob-in { from { opacity: 0; transform: translateY(14px); } }
.ob-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--text-faint); margin-bottom: 10px; }
.ob-title { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.ob-sub { margin: 0 0 26px; font-size: 14px; color: var(--text-dim); line-height: 1.45; }
.ob-opt { color: var(--text-faint); }

.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 30px; }
.ob-chip {
  display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 0 13px;
  border-radius: var(--r-md); border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.ob-chip:active { transform: scale(0.97); }
.obc-emoji { font-size: 20px; }
.ob-chip.on { border-color: var(--accent); background: rgba(24, 224, 138, 0.1); }
.obc-check {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px;
  background: var(--accent); color: #04140d; font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.15s;
}
.ob-chip.on .obc-check { opacity: 1; transform: scale(1); }

.ob-next {
  width: 100%; padding: 16px; border: 0; border-radius: 15px; background: var(--grad);
  color: #04140d; font-family: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 20px rgba(24, 224, 138, 0.35); transition: opacity 0.2s;
}
.ob-next:disabled { opacity: 0.35; box-shadow: none; }

/* Champ ville (réutilise le dropdown .geo-drop de l'app) */
.ob-city-wrap { position: relative; margin-bottom: 30px; }
#ob-city {
  width: 100%; padding: 16px 15px; border-radius: var(--r-md);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 16px; font-weight: 600; outline: none;
}
#ob-city:focus { border-color: var(--accent); }
#ob-city::placeholder { color: var(--text-faint); font-weight: 500; }
