/* ============================================================================
   NECROPOLIS - DESIGN SYSTEM
   Tactical militaire post-apocalyptique. Dark, gritty, premium.
============================================================================ */

[x-cloak] { display: none !important; }

/* Disable pull-to-refresh sur mobile (casse PWA standalone si actif) */
html, body {
  overscroll-behavior-y: contain;
}

:root {
  /* Couleurs base */
  --c-void:          #050507;
  --c-noir:          #0E0E10;
  --c-noir-2:        #14141a;
  --c-beton:         #1c1c20;
  --c-beton-2:       #2a2a2e;
  --c-rouille:       #453C38;
  --c-rouille-2:     #5A4030;
  --c-fog:           #5A6B75;
  --c-bone:          #c8c0b4;

  /* Accents */
  --c-blood:         #A81E1E;
  --c-blood-dark:    #7A1414;
  --c-blood-glow:    #C92B2B;
  --c-fire:          #E86A19;
  --c-fire-dark:     #B84F0E;
  --c-toxic:         #6BBF3A;
  --c-tesla:         #3AE3FF;
  --c-neon:          #F2C94C;

  /* Ombres / glows */
  --shadow-blood:    0 0 24px rgba(168, 30, 30, 0.4);
  --shadow-fire:     0 0 24px rgba(232, 106, 25, 0.35);
  --shadow-tesla:    0 0 16px rgba(58, 227, 255, 0.5);
  --shadow-deep:     0 24px 60px -12px rgba(0,0,0,0.85), 0 8px 24px -8px rgba(0,0,0,0.6);
  --shadow-card:     0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px -12px rgba(0,0,0,0.6);

  /* Borders */
  --border-glass:    1px solid rgba(255, 255, 255, 0.06);
  --border-active:   1px solid rgba(168, 30, 30, 0.4);

  /* Easings */
  --ease-out-quint:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   BASE
============================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--c-noir);
  color: #d4d4d4;
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  background-image:
    radial-gradient(ellipse 80% 60% at 30% 0%, rgba(168, 30, 30, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232, 106, 25, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 0% 50%, rgba(58, 227, 255, 0.02) 0%, transparent 40%);
}

::selection { background: var(--c-blood); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-rouille); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-blood); }

/* iOS no zoom */
@supports (-webkit-touch-callout: none) {
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], select, textarea { font-size: 16px; }
}

button { touch-action: manipulation; }

/* PWA standalone safe areas */
@media all and (display-mode: standalone) {
  .safe-top { padding-top: max(env(safe-area-inset-top), 0px); }
  .safe-bottom { padding-bottom: max(env(safe-area-inset-bottom), 0px); }
}

/* ============================================================================
   TYPOGRAPHY
============================================================================ */
.font-display {
  font-family: 'Bebas Neue', 'Anton', 'Impact', sans-serif;
  font-weight: 400;
  /* letter-spacing supprime : laisse Tailwind tracking-* gerer */
  font-feature-settings: 'kern', 'liga';
}
.font-narrative {
  font-family: 'Special Elite', 'Courier Prime', monospace;
  letter-spacing: 0;
}
.text-stroke {
  -webkit-text-stroke: 1px var(--c-blood);
  color: transparent;
}
.text-shadow-glow { text-shadow: 0 0 12px currentColor; }
.text-shadow-deep { text-shadow: 0 2px 8px rgba(0,0,0,0.8); }

/* ============================================================================
   GRADIENTS / BACKGROUNDS
============================================================================ */
.bg-noir-gradient {
  background: linear-gradient(180deg, var(--c-noir) 0%, var(--c-beton) 100%);
}
.bg-blood-vignette {
  background: radial-gradient(ellipse at center, transparent 0%, rgba(168,30,30,0.15) 100%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(168,30,30,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,30,30,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.bg-noise {
  position: relative;
}
.bg-noise::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
  opacity: 0.4; mix-blend-mode: overlay; pointer-events: none;
}

/* Glass / backdrop */
.glass {
  background: rgba(20, 20, 26, 0.7);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255,255,255,0.06);
}
.glass-strong {
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* ============================================================================
   BUTTONS PREMIUM
============================================================================ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-quint);
  font-size: 0.95rem;
  white-space: nowrap;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}
.btn:hover::before { transform: translateX(100%); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--c-blood) 0%, var(--c-blood-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-blood), inset 0 1px 0 rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.1);
}
.btn-primary:hover {
  box-shadow: 0 0 32px rgba(168,30,30,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(20, 20, 26, 0.6);
  color: #d4d4d4;
  border-color: var(--c-rouille);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  border-color: var(--c-fire);
  color: var(--c-fire);
}
.btn-ghost {
  background: transparent;
  color: #9ca3af;
}
.btn-ghost:hover { color: var(--c-blood); }

.btn-cta {
  background: linear-gradient(135deg, var(--c-blood) 0%, var(--c-blood-dark) 100%);
  color: #fff;
  font-size: 1.25rem;
  padding: 1rem 2rem;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow:
    0 0 0 1px rgba(168,30,30,0.4),
    0 0 32px rgba(168,30,30,0.4),
    inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.btn-cta::after {
  content: '';
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255,200,150,0.3), transparent);
  animation: spin 4s linear infinite;
  pointer-events: none;
}
.btn-cta > * { position: relative; z-index: 1; }

/* ============================================================================
   PANELS / CARDS
============================================================================ */
.panel {
  background: rgba(28, 28, 32, 0.6);
  border: 1px solid rgba(69, 60, 56, 0.4);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  position: relative;
}
.panel-header {
  border-bottom: 1px solid rgba(69, 60, 56, 0.4);
  padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
  font-size: 1rem;
}
.panel-corner {
  position: relative;
}
.panel-corner::before, .panel-corner::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--c-blood);
  pointer-events: none;
}
.panel-corner::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel-corner::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* Stat tile */
.stat-tile {
  display: flex; flex-direction: column; gap: 0.125rem;
  padding: 0.5rem 0.75rem;
  background: rgba(14, 14, 16, 0.6);
  border: 1px solid rgba(69, 60, 56, 0.3);
  border-radius: 2px;
}
.stat-tile .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6b7280;
}
.stat-tile .value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

/* Resource bar */
.res-pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: rgba(14, 14, 16, 0.85);
  border: 1px solid rgba(69, 60, 56, 0.5);
  border-radius: 2px;
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  position: relative;
}
.res-pill::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: currentColor;
  opacity: 0.7;
}
.res-pill.wood { color: #c98850; border-color: rgba(201, 136, 80, 0.3); }
.res-pill.metal { color: #9eb4c1; border-color: rgba(158, 180, 193, 0.3); }
.res-pill.stone { color: #d1d5db; border-color: rgba(209, 213, 219, 0.3); }
.res-pill.food { color: var(--c-toxic); border-color: rgba(107, 191, 58, 0.3); }
.res-pill.gems { color: var(--c-tesla); border-color: rgba(58, 227, 255, 0.3); }

/* Building card */
.building-card {
  position: relative;
  display: flex; gap: 0.75rem; align-items: stretch;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(28,28,32,0.6) 0%, rgba(14,14,16,0.4) 100%);
  border: 1px solid rgba(69, 60, 56, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-quint);
  overflow: hidden;
}
.building-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--c-rouille);
  transition: background 0.2s, width 0.2s;
}
.building-card:hover:not(.disabled) {
  border-color: rgba(232, 106, 25, 0.5);
  background: linear-gradient(135deg, rgba(232,106,25,0.08) 0%, rgba(14,14,16,0.4) 100%);
  transform: translateX(2px);
}
.building-card:hover:not(.disabled)::before { background: var(--c-fire); width: 3px; }
.building-card.active {
  border-color: var(--c-fire);
  background: linear-gradient(135deg, rgba(232,106,25,0.15) 0%, rgba(14,14,16,0.4) 100%);
}
.building-card.active::before { background: var(--c-fire); width: 3px; }
.building-card.disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.5); }
.building-card.disabled::before { background: var(--c-rouille); }

/* Building icon container */
.building-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 14, 16, 0.7);
  border: 1px solid rgba(69, 60, 56, 0.4);
  border-radius: 2px;
  position: relative;
}

/* Inputs */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  background: rgba(14, 14, 16, 0.8);
  border: 1px solid rgba(69, 60, 56, 0.5);
  color: #e5e5e5;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  width: 100%;
  transition: all 0.2s var(--ease-out-quint);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--c-blood);
  background: rgba(14, 14, 16, 1);
  box-shadow: 0 0 0 2px rgba(168, 30, 30, 0.15);
}
input::placeholder, textarea::placeholder { color: #4a4a4a; }

/* Form label */
.form-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6b7280;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Progress bar */
.progress-bar {
  position: relative; height: 6px;
  background: rgba(14, 14, 16, 0.8);
  border: 1px solid rgba(69, 60, 56, 0.4);
  overflow: hidden;
}
.progress-bar > .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-blood) 0%, var(--c-fire) 100%);
  transition: width 0.6s var(--ease-out-quint);
  position: relative;
}
.progress-bar > .fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  animation: shimmer 2s linear infinite;
}

/* HP bar */
.hp-bar {
  height: 4px;
  background: rgba(0,0,0,0.6);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.hp-bar > .fill {
  height: 100%;
  transition: width 0.4s var(--ease-out-quint);
}
.hp-bar > .fill.full { background: var(--c-toxic); }
.hp-bar > .fill.mid  { background: var(--c-neon); }
.hp-bar > .fill.low  { background: var(--c-blood); }

/* ============================================================================
   ANIMATIONS
============================================================================ */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  43% { opacity: 0.95; }
  45% { opacity: 0.7; }
  47% { opacity: 1; }
  72% { opacity: 0.85; }
  74% { opacity: 1; }
}
.animate-flicker { animation: flicker 4s linear infinite; }

@keyframes pulse-blood {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 30, 30, 0.7), inset 0 0 0 0 rgba(168, 30, 30, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(168, 30, 30, 0), inset 0 0 32px rgba(168, 30, 30, 0.2); }
}
.animate-pulse-blood { animation: pulse-blood 2.5s ease-in-out infinite; }

@keyframes glitch {
  0%, 100% { transform: translate(0); filter: hue-rotate(0deg); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); filter: hue-rotate(15deg); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); filter: hue-rotate(-15deg); }
}
.animate-glitch:hover { animation: glitch 0.6s ease-in-out infinite; }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 0.6s var(--ease-out-quint) backwards; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.scan-line {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.scan-line::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-blood), transparent);
  box-shadow: 0 0 8px var(--c-blood);
  animation: scan 4s linear infinite;
}

@keyframes drip {
  0% { height: 0; opacity: 0; }
  20% { opacity: 0.6; }
  100% { height: 60px; opacity: 0; }
}
.blood-drip {
  position: absolute; top: 0; width: 1px;
  background: linear-gradient(180deg, var(--c-blood) 0%, transparent 100%);
  animation: drip 4s ease-in infinite;
}

/* Particles drift */
@keyframes drift-up {
  0% { transform: translate(0, 100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; transform: translate(0, 90vh) scale(1); }
  90% { opacity: 0.4; }
  100% { transform: translate(20px, -10vh) scale(0.5); opacity: 0; }
}
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--c-fog);
  border-radius: 50%;
  pointer-events: none;
  animation: drift-up 12s linear infinite;
}

/* Canvas */
#city-canvas {
  display: block;
  background: var(--c-noir);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

/* Toast */
.toast {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  backdrop-filter: blur(12px);
  font-size: 0.875rem;
  border: 1px solid;
  box-shadow: var(--shadow-deep);
  animation: fade-in-up 0.3s var(--ease-out-quint);
  pointer-events: auto;
}
.toast.error   { border-color: var(--c-blood); background: rgba(168,30,30,0.2); color: #fee2e2; }
.toast.success { border-color: var(--c-toxic); background: rgba(107,191,58,0.2); color: #dcfce7; }
.toast.info    { border-color: var(--c-neon); background: rgba(242,201,76,0.2); color: #fef9c3; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5,5,7,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 32rem;
  background: linear-gradient(180deg, var(--c-noir-2) 0%, var(--c-noir) 100%);
  border: 1px solid var(--c-rouille);
  box-shadow: var(--shadow-deep), 0 0 80px -20px rgba(168,30,30,0.4);
  animation: fade-in-up 0.4s var(--ease-out-expo);
}

/* Mobile bottom nav (3 items, plein largeur, sticky bottom + safe area) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0.25rem 0 max(0.25rem, env(safe-area-inset-bottom));
  background: rgba(14, 14, 16, 0.92);
  border-top: 1px solid rgba(168, 30, 30, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px 4px;
  min-height: 56px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.bottom-nav-item.active {
  color: var(--c-blood);
}
.bottom-nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 2px;
  background: var(--c-blood);
  box-shadow: 0 0 8px var(--c-blood);
}

/* ============================================================
   BOTTOM SHEET (mobile drawer)
   Glissent depuis le bas, overlay le canvas sans le cacher
============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}
.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 49;
  max-height: 70vh;
  background: linear-gradient(180deg, #15151a 0%, var(--c-noir) 100%);
  border-top: 1px solid var(--c-rouille);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.sheet.is-open {
  transform: translateY(0);
}
.sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  margin: 8px auto 4px;
  flex-shrink: 0;
}
.sheet-header {
  padding: 8px 16px 12px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(69, 60, 56, 0.4);
  flex-shrink: 0;
}
.sheet-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: #fff;
  flex: 1;
  margin: 0;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px;
}
.sheet-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(168, 30, 30, 0.4);
  background: transparent;
  color: var(--c-blood);
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px; line-height: 1;
}
.sheet-close:hover, .sheet-close:active {
  background: rgba(168, 30, 30, 0.15);
}

/* Header compact mobile */
.mobile-header-compact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(14, 14, 16, 0.96);
  border-bottom: 1px solid rgba(168, 30, 30, 0.3);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 30;
}

/* Resource strip mobile (4 colonnes egales, tres compact) */
.res-strip-mobile {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 8px;
  background: rgba(14, 14, 16, 0.85);
  border-bottom: 1px solid rgba(69, 60, 56, 0.3);
}
.res-strip-mobile .res-cell {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 4px;
  background: rgba(28, 28, 32, 0.8);
  border: 1px solid rgba(69, 60, 56, 0.4);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-height: 32px;
}
.res-strip-mobile .res-cell svg {
  width: 12px; height: 12px;
  flex-shrink: 0;
}
.res-strip-mobile .res-cell.wood  { color: #c98850; border-color: rgba(201,136,80,0.4); }
.res-strip-mobile .res-cell.metal { color: #9eb4c1; border-color: rgba(158,180,193,0.4); }
.res-strip-mobile .res-cell.stone { color: #d1d5db; }
.res-strip-mobile .res-cell.food  { color: var(--c-toxic); border-color: rgba(107,191,58,0.4); }

/* Building info popup compact mobile (au-dessus bottom nav) */
.building-info-mobile {
  position: fixed; left: 8px; right: 8px;
  bottom: calc(56px + env(safe-area-inset-bottom) + 8px);
  z-index: 35;
  background: linear-gradient(180deg, rgba(28,28,32,0.98) 0%, rgba(14,14,16,0.98) 100%);
  border: 1px solid rgba(168, 30, 30, 0.5);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

/* Utilities */
.clip-corners {
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.clip-corners-sharp {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--c-beton) 0%, var(--c-beton-2) 50%, var(--c-beton) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* Hidden until ready */
.fade-in-mounted { opacity: 0; transition: opacity 0.5s; }
.fade-in-mounted.ready { opacity: 1; }

/* Border luminous */
.border-luminous {
  position: relative;
}
.border-luminous::before {
  content: '';
  position: absolute; inset: -1px;
  background: linear-gradient(135deg, transparent 30%, var(--c-blood) 50%, transparent 70%);
  background-size: 200% 200%;
  animation: shimmer 3s linear infinite;
  z-index: -1;
  filter: blur(1px);
  opacity: 0.6;
}
