/* ═══════════════════════════════════════════════════════════
   VAE VICTIS — MOBILE CSS
   Dark theme, app native feel, Rajdhani + Inter
════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:          #0a0c14;
  --bg2:         #111420;
  --bg3:         #181c2a;
  --bg4:         #1e2336;
  --border:      #2a2f45;
  --border2:     #353c58;

  --text:        #e8eaf2;
  --text2:       #9aa0bc;
  --text3:       #5a6080;

  --accent:      #c8a84b;       /* or Vae Victis */
  --accent2:     #e2c96a;
  --danger:      #d9534f;
  --success:     #2a9a6a;
  --info:        #4a8ad4;

  /* Panthéons */
  --olympien:    #c8a84b;
  --shenming:    #c44040;
  --sovereign:   #4a8ad4;

  --nav-h:       64px;
  --header-h:    52px;
  --radius:      12px;
  --radius-sm:   8px;

  --font-title:  'Rajdhani', sans-serif;
  --font-body:   'Inter', sans-serif;

  --shadow:      0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   SPLASH SCREEN
════════════════════════════════════════════════════════════ */
#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#splash.hidden {
  opacity: 0;
  visibility: hidden;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.splash-logo {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(200,168,75,0.3);
  animation: splashPulse 2s ease-in-out infinite;
}
.splash-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes splashPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(200,168,75,0.2); }
  50%       { box-shadow: 0 0 40px rgba(200,168,75,0.5); }
}
.splash-title {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
}
.splash-sub {
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.splash-bar {
  width: 160px;
  height: 3px;
  background: var(--bg4);
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}
.splash-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  animation: splashLoad 2.5s ease forwards;
}
@keyframes splashLoad {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════
   APP LAYOUT
════════════════════════════════════════════════════════════ */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════ */
#mob-header {
  height: var(--header-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 100;
}
.mob-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
}
.mob-logo i { font-size: 20px; }

.mob-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mob-sync {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text3);
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text3);
  transition: background 0.3s;
}
.sync-dot.ok    { background: var(--success); }
.sync-dot.error { background: var(--danger); }
.sync-dot.pulse {
  background: var(--accent);
  animation: dotPulse 1s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.cycle-badge {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(200,168,75,0.1);
  border: 1px solid rgba(200,168,75,0.25);
  border-radius: 6px;
  padding: 2px 7px;
}
.mob-icon-btn {
  width: 32px;
  height: 32px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.mob-icon-btn:active { background: var(--bg4); transform: scale(0.92); }

/* ═══════════════════════════════════════════════════════════
   MAIN + ONGLETS
════════════════════════════════════════════════════════════ */
#mob-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.mob-tab {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mob-tab.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ── Header commun des onglets ── */
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.tab-header h2 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}
.tab-header-right { display: flex; align-items: center; gap: 8px; }
.tab-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 7px;
  font-family: var(--font-title);
}

/* ═══════════════════════════════════════════════════════════
   BOTTOM NAV
════════════════════════════════════════════════════════════ */
#mob-nav {
  height: var(--nav-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text3);
  font-family: var(--font-body);
  font-size: 10px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.nav-btn i { font-size: 22px; transition: transform 0.2s; }
.nav-btn span { font-size: 10px; letter-spacing: 0.5px; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active i { transform: scale(1.1); }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}
.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}
.nav-badge.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════
   CLASSEMENT DIVINITÉS
════════════════════════════════════════════════════════════ */
#ranking-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}
.ranking-title {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
#ranking-list { display: flex; flex-direction: column; gap: 6px; }
.rank-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.rank-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.rank-card--olympien::before  { background: var(--olympien); }
.rank-card--shenming::before  { background: var(--shenming); }
.rank-card--sovereign::before { background: var(--sovereign); }
.rank-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.rank-avatar--placeholder {
  background: var(--bg4);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 14px;
}
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-family: var(--font-title); font-size: 14px; font-weight: 700; color: var(--text); }
.rank-panth { font-size: 11px; color: var(--text3); }
.rank-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rank-medal { font-size: 14px; }
.rank-pi { font-family: var(--font-title); font-size: 13px; font-weight: 700; color: var(--accent); }

/* ══ Bottom Sheet (panel zones) ══ */
.bottom-sheet {
  position: fixed;
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  border-radius: 20px 20px 0 0;
  z-index: 300;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(100%);
}
.bottom-sheet:not(.hidden) { transform: translateY(0); }
.bottom-sheet.hidden { transform: translateY(110%); pointer-events: none; }
.bottom-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border2);
  border-radius: 99px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bottom-sheet-header span {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.bottom-sheet-header button {
  width: 30px; height: 30px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bottom-sheet-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 12px 16px 20px;
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 299;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s;
}
.zp-hero-img {
  height: 120px;
  background-size: cover;
  background-position: center;
  margin: -12px -16px 0;
  border-radius: 0;
}
.sheet-backdrop.hidden { display: none; }
.nations-toolbar {
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.mob-search-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   ONGLET NATIONS
════════════════════════════════════════════════════════════ */
.mob-search {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 10px;
  width: 140px;
  outline: none;
  transition: border-color 0.2s;
}
.mob-search:focus { border-color: var(--accent); }
.mob-search::placeholder { color: var(--text3); }

/* ══ Territoire card dans le panel ══ */
.zp-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.territoire-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}
.territoire-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--border2);
}
.territoire-card.olympien::before  { background: var(--olympien); }
.territoire-card.shenming::before  { background: var(--shenming); }
.territoire-card.sovereign::before { background: var(--sovereign); }
.terr-img {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.terr-info { flex: 1; min-width: 0; }
.terr-name { font-family: var(--font-title); font-size: 14px; font-weight: 700; color: var(--text); }
.terr-owner { font-size: 11px; color: var(--text2); margin-top: 2px; }
.terr-pi { font-family: var(--font-title); font-size: 14px; font-weight: 700; color: var(--accent); flex-shrink: 0; }

.pantheon-filters {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.pantheon-filters::-webkit-scrollbar { display: none; }
.pf-btn {
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.pf-btn.active, .pf-btn:active {
  background: rgba(200,168,75,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.nations-list { padding: 8px 16px 80px; display: flex; flex-direction: column; gap: 8px; }
.list-loading {
  text-align: center;
  color: var(--text3);
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}
.list-loading i { animation: spin 1.2s linear infinite; }

/* Card nation */
.nation-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 72px;
}
.nation-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border2);
  transition: background 0.2s;
}
.nation-card.olympien::before { background: var(--olympien); }
.nation-card.shenming::before { background: var(--shenming); }
.nation-card.sovereign::before { background: var(--sovereign); }
.nation-card:active { background: var(--bg3); transform: scale(0.98); }

.nc-info { flex: 1; min-width: 0; }
.nc-name {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-deity { font-size: 12px; color: var(--text2); margin-top: 3px; }
.nc-panth { font-weight: 600; }
.nc-panth--olympien { color: var(--olympien); }
.nc-panth--shenming { color: var(--shenming); }
.nc-panth--sovereign { color: var(--sovereign); }
.nc-pts-inline {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
}

/* Image à droite de la card */
.nc-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border2);
}
.nc-img-avatar { border-radius: 50%; border-color: var(--accent); }
.nc-img-placeholder {
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 22px;
}

/* Hero du panel nation */
.np-hero {
  height: 180px;
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.np-hero-overlay {
  background: linear-gradient(to top, rgba(10,12,20,0.95) 0%, rgba(10,12,20,0.4) 60%, transparent 100%);
  width: 100%;
  padding: 16px;
}
.np-hero-name {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.np-hero-deity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text2);
}
.np-deity-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent);
}

/* Panel nation (slide-in) */
.nation-panel {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}
.nation-panel:not(.hidden) { transform: translateX(0); }
.nation-panel.hidden { transform: translateX(100%); }
.np-topbar {
  position: sticky;
  top: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  z-index: 10;
}
#np-back {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
#np-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
#np-content { padding: 16px; }

/* ═══════════════════════════════════════════════════════════
   ONGLET ATTAQUES
════════════════════════════════════════════════════════════ */
.center-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 30px;
  color: var(--text3);
  text-align: center;
}
.center-prompt i { font-size: 40px; }
.center-prompt p { font-size: 14px; line-height: 1.5; }

.atk-section { padding: 12px 16px 4px; }
.atk-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.atk-section-title--warn { color: #f07070; }
.atk-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.atk-empty { font-size: 12px; color: var(--text3); text-align: center; padding: 20px 0; }

/* Card attaque */
.atk-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.atk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.atk-card-target {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.atk-card-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(200,168,75,0.12);
  color: var(--accent);
  border: 1px solid rgba(200,168,75,0.3);
}
.atk-card-desc { font-size: 12px; color: var(--text2); line-height: 1.4; }
.atk-card-meta { font-size: 11px; color: var(--text3); margin-top: 6px; }

.atk-fab-wrap {
  padding: 16px;
  display: flex;
  justify-content: center;
}
.mob-fab {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1400;
  border: none;
  border-radius: 99px;
  padding: 12px 24px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(200,168,75,0.3);
  transition: all 0.2s;
}
.mob-fab:active { transform: scale(0.95); box-shadow: 0 2px 10px rgba(200,168,75,0.2); }

/* ═══════════════════════════════════════════════════════════
   ONGLET PROFIL / LOGIN
════════════════════════════════════════════════════════════ */
#profil-loggedout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px 80px;
  min-height: 100%;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.login-emblem {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 2px solid var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  margin: 0 auto 14px;
  box-shadow: 0 0 20px rgba(200,168,75,0.25);
}
.login-card h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 6px;
}
.login-sub { font-size: 12px; color: var(--text3); margin-bottom: 20px; }
.login-fields { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.login-error {
  background: rgba(217,83,79,0.12);
  border: 1px solid rgba(217,83,79,0.3);
  color: #f07070;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
}
.login-error.hidden { display: none; }

/* Profil connecté */
#profil-loggedin { padding: 0 0 80px; }
.profil-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.profil-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  background: var(--bg3);
}
.profil-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profil-name {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.profil-faction { font-size: 12px; color: var(--text2); margin-top: 2px; }
.profil-pts {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}
.profil-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.ps-card {
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  gap: 4px;
}
.ps-val {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.ps-label { font-size: 11px; color: var(--text3); }
.profil-actions { padding: 16px; }

/* ═══════════════════════════════════════════════════════════
   COMPOSANTS COMMUNS
════════════════════════════════════════════════════════════ */

/* Boutons */
.mob-btn {
  height: 44px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1400;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-appearance: none;
}
.mob-btn:active { transform: scale(0.96); opacity: 0.9; }
.mob-btn-full { width: 100%; }
.mob-btn-ghost {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.mob-btn-danger {
  background: linear-gradient(135deg, #c0392b, #d9534f);
  color: #fff;
}

/* Inputs */
.mob-input, .mob-select, .mob-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.mob-input:focus, .mob-select:focus, .mob-textarea:focus {
  border-color: var(--accent);
}
.mob-select { cursor: pointer; }
.mob-textarea { resize: none; line-height: 1.5; }

/* Modals */
.mob-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s;
}
.mob-modal.hidden { display: none; }
.mob-modal-inner {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mob-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  position: sticky;
  top: 0;
  background: var(--bg2);
}
.mob-modal-close {
  width: 30px;
  height: 30px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mob-modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mob-modal-body label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text3);
  text-transform: uppercase;
}
.mob-modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.mob-modal-footer .mob-btn { flex: 1; }

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
