/* ========== GETUP4UNITY - DESKTOP APP ========== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --bg-elevated: #22222e;
  --bg-hover: #2a2a38;
  --bg-sidebar: #0f0f14;
  
  /* Accent Colors */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --warning: #f59e0b;
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  /* Transitions */
  --transition: 0.2s ease;
  
  /* Sizes */
  --titlebar-height: 40px;
  --sidebar-width: 260px;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== GLOBAL FORM STYLES ========== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder,
select::placeholder {
  color: var(--text-muted);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-size: 0.9rem;
}

select {
  cursor: pointer;
}

/* ========== TITLEBAR ========== */
.titlebar {
  height: var(--titlebar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  -webkit-app-region: drag;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.titlebar-drag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.titlebar-icon {
  font-size: 1.2rem;
}

.titlebar-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.titlebar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-app-region: no-drag;
}

.status-indicator {
  font-size: 0.7rem;
  transition: color var(--transition);
}

.status-indicator.online { color: var(--success); }
.status-indicator.offline { color: var(--danger); }

/* ========== WEB VERSION STYLES ========== */
body.web-version {
  overflow: auto;
}

body.web-version .titlebar {
  display: none;
}

.web-header {
  height: var(--titlebar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

.header-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-status .status-text {
  display: none;
}

@media (min-width: 768px) {
  .header-status .status-text {
    display: inline;
  }
}

/* ========== SCREENS ========== */
.screen {
  display: none;
  height: calc(100% - var(--titlebar-height));
  margin-top: var(--titlebar-height);
}

.screen.active {
  display: flex;
}

/* ========== AUTH SCREEN ========== */
#auth-screen {
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#auth-screen::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: 
    radial-gradient(circle at 20% 30%, var(--accent-glow) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, var(--success-glow) 0%, transparent 40%);
  opacity: 0.6;
  animation: aurora 30s ease infinite;
}

@keyframes aurora {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(5%, 5%) rotate(10deg); }
}

.auth-container {
  display: flex;
  gap: 60px;
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  padding: 40px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 400px;
  backdrop-filter: blur(20px);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 74px;
  height: 74px;
  object-fit: contain;
  margin-bottom: 12px;
}

.auth-logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--success) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  opacity: 0.6;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  text-align: center;
}

.message.error {
  background: var(--danger-glow);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.message.success {
  background: var(--success-glow);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

.btn-large {
  padding: 14px 28px;
  width: 100%;
  font-size: 1rem;
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-ghost {
  background: #ef4444;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 0 20px var(--danger-glow);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ========== APP SCREEN ========== */
#app-screen {
  flex-direction: row;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-status.online {
  color: var(--success);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
}

.nav-tab:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.nav-tab.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: 5px;
}

.nav-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  font-size: 1.2rem;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--danger);
  color: white;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  margin-top: auto;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.logout-btn:hover {
  background: var(--danger-glow);
  border-color: var(--danger);
  color: var(--danger);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.page {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.page.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.page-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

/* ========== VIEW TOGGLE ========== */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.view-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.view-btn:hover {
  color: var(--text-secondary);
}

.view-btn.active {
  background: var(--accent);
  color: white;
}

.view {
  display: none;
  height: 100%;
}

.view.active {
  display: block;
}

/* ========== MAP ========== */
.map-wrapper {
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

#map {
  width: 100%;
  height: 100%;
}

.map-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 1000;
}

.legend {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 20px;
  backdrop-filter: blur(10px);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ========== USER MARKERS (Map) ========== */
.user-marker {
  background: transparent;
  border: none;
}

.user-marker-inner {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
  animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.8);
  }
}

/* ========== SEARCH BAR ========== */
.search-container {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-input {
  width: 100%;
  padding: 14px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input:focus + .search-icon,
.search-input-wrapper:focus-within .search-icon {
  color: var(--accent);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-hover);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background: var(--danger-glow);
  color: var(--danger);
}

.search-results-count {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== USERS GRID ========== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all var(--transition);
  min-height: 340px;
}

.user-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-avatar.has-image {
  background: transparent;
  font-size: 0;
}

.user-info {
  flex: 1;
}

.user-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.user-zone {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.user-actions .btn {
  padding: 12px 16px;
  font-size: 0.9rem;
  justify-content: center;
  width: 100%;
}

/* ========== UTILISATEURS SIGNALÉS ========== */
.user-card.flagged {
  border-color: var(--danger);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.user-card.flagged:hover {
  border-color: var(--danger);
  box-shadow: var(--shadow-md), 0 0 20px var(--danger-glow);
}

.user-avatar.danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
}

.user-card-alert {
  background: var(--danger-glow);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
}

.report-badge-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--warning);
  color: #000;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.report-badge-card.danger {
  background: var(--danger);
  color: white;
}

/* Popup signalement */
.user-popup.flagged strong {
  color: var(--danger) !important;
  background: none !important;
  -webkit-text-fill-color: var(--danger) !important;
}

.report-badge {
  display: block;
  padding: 4px 10px;
  background: var(--warning);
  color: #000;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 8px 0;
}

.report-badge.danger {
  background: var(--danger);
  color: white;
}

.popup-alert {
  background: var(--danger-glow);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 0.8rem;
  color: var(--danger);
}

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.popup-btn.report {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.popup-btn.report:hover {
  background: var(--danger);
  color: white;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.user-card-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-card-info h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.user-card-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-card-actions {
  display: flex;
  gap: 8px;
}

/* ========== MATCHES ========== */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.matches-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}

.match-card:hover {
  background: var(--bg-elevated);
}

.match-card.accepted {
  flex-wrap: wrap;
}

.match-card.accepted .match-actions {
  flex: 0 1 auto;
  margin-left: auto;
}

.match-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.match-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.match-avatar span {
  color: white;
  font-size: 1.2rem;
}

.match-info {
  flex: 1;
}

.match-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.match-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.meeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-glow);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 8px;
}

/* ========== PROFILE ========== */
.profile-wrapper {
  max-width: 500px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 500px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-bottom: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.profile-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-since {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-banner {
  height: 100px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  position: relative;
}

.profile-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 4px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  position: absolute;
  bottom: -45px;
  left: 24px;
}

.profile-details {
  padding: 60px 24px 24px;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-item {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-info {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-value {
  font-weight: 500;
}

.profile-actions {
  padding: 24px;
  border-top: 1px solid var(--border);
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1rem;
}

/* ========== TOAST ========== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  min-width: 280px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.toast.fade-out {
  animation: toastOut 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--accent);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========== LEAFLET OVERRIDES ========== */
.leaflet-popup-content-wrapper {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.15) !important;
}

.leaflet-popup-content {
  color: var(--text-primary) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.leaflet-popup-tip {
  background: var(--bg-elevated) !important;
  border: none !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 20px !important;
  top: 8px !important;
  right: 10px !important;
  transition: color 0.2s ease !important;
}

.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* User Popup Styles */
.user-popup {
  padding: 16px 20px;
  text-align: center;
  min-width: 180px;
}

.user-popup strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--accent-light), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, var(--accent-light) 0%, #a855f7 100%);
}

.popup-btn:active {
  transform: translateY(0);
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-hover) !important;
}

/* ========== DARK MAP ========== */
.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.2);
  animation: modalSlideIn 0.3s ease;
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--danger);
}

#edit-profile-form {
  padding: 24px;
}

#edit-profile-form .form-group {
  margin-bottom: 20px;
}

#edit-profile-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

#edit-profile-form input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-elevated);
  border-color: var(--border);
}

.label-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.label-disabled {
  font-weight: 400;
  color: var(--danger);
  font-size: 0.85rem;
}

.form-hint {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
}

/* Profile extras */
.address-restriction {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--warning);
  margin-bottom: 20px;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-actions .btn {
  flex: 1;
  min-width: 180px;
}

/* ========== MAISONS (Houses) ========== */

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.house-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.house-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.house-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.house-icon {
  font-size: 2rem;
}

.house-info {
  flex: 1;
}

.house-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.house-role {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--bg-elevated);
}

.role-creator {
  background: #8B5CF6;
  color: white;
  font-weight: 600;
}

.role-admin {
  background: #EC4899;
  color: white;
  font-weight: 600;
}

.house-members {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.house-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.house-actions {
  display: flex;
  gap: 8px;
}

.house-actions .btn {
  flex: 1;
}

/* Invite Code */
.invite-section {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.invite-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.invite-code-box code {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--accent-light);
}

/* Members List */
.members-section,
.requests-section {
  margin-top: 20px;
}

.members-section h4,
.requests-section h4 {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.members-list,
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-item,
.request-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  padding: 12px;
  border-radius: var(--radius-md);
  justify-content: space-between;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar img,
.member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-avatar.has-image {
  background: transparent;
  font-size: 0;
}

.request-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.request-avatar img,
.request-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.request-avatar.has-image {
  background: transparent;
  font-size: 0;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 500;
}

.member-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.member-role.role-creator {
  background: #8B5CF6;
  color: white;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.member-role.role-admin {
  background: #EC4899;
  color: white;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.member-actions {
  display: flex;
  gap: 6px;
}

.member-score,
.reliability-badge {
  font-size: 0.85rem;
  color: var(--warning);
}

.request-info {
  flex: 1;
}

.request-user {
  font-weight: 500;
}

.request-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 4px;
}

.request-actions {
  display: flex;
  gap: 8px;
}

/* ========== MESSAGERIE ========== */

.messages-layout {
  display: flex;
  height: calc(100vh - var(--titlebar-height) - 80px);
  gap: 0;
}

.conversations-sidebar {
  width: 320px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.conv-search-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.conv-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.conversation-item:hover {
  background: var(--bg-hover);
}

.conversation-item.active {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}

.conversation-item.unread {
  background: rgba(99, 102, 241, 0.1);
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.conv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.conv-avatar.has-image {
  background: transparent;
  font-size: 0;
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.conv-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.conv-preview {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.conv-badge {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

/* Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}

.chat-panel.active {
  display: flex;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
}

.chat-header-name {
  font-weight: 600;
}

.chat-header-status {
  font-size: 0.8rem;
  color: var(--success);
}

.chat-header-status.active {
  color: var(--accent-light);
  font-style: italic;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.message.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message.received {
  align-self: flex-start;
  align-items: flex-start;
}

.message-sender {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-left: 12px;
}

.message-sender-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  margin-left: 4px;
}

.message-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.message-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.message-bubble {
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  position: relative;
}

.message.sent .message-bubble {
  background: var(--accent);
  color: white;
}

.message-content {
  margin: 0;
  word-break: break-word;
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.pending-indicator {
  opacity: 0.7;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 49%, 100% { opacity: 0.7; }
  50%, 99% { opacity: 0.4; }
}

.message.pending .message-bubble {
  opacity: 0.8;
}

/* ========== PROFILE LANGUAGES ========== */

.profile-languages {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.profile-languages h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.profile-languages p {
  color: var(--text-secondary);
}

.profile-sponsors {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 0 16px 16px;
}

.profile-sponsors h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.sponsors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sponsor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.sponsor-name {
  color: var(--text-primary);
  font-weight: 500;
}

.sponsor-score {
  color: var(--warning);
  font-size: 0.85rem;
}

.sponsors-more {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 8px;
  font-style: italic;
}

.profile-reliability {
  color: var(--warning);
  font-size: 0.9rem;
  margin-top: 4px;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.languages-grid .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.languages-grid .checkbox-label:hover {
  background: var(--bg-hover);
}

.languages-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* ========== HOUSES TABS ========== */

.houses-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 15px;
}

.houses-tab {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.houses-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.houses-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.public-house {
  border-left: 3px solid var(--success);
}

.house-creator {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.house-full {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.loading-state,
.error-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.message.sent .message-time {
  color: rgba(255,255,255,0.7);
}

.message-input-area {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.message-input-area textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
}

.message-input-area .btn {
  padding: 12px 20px;
  font-size: 1.2rem;
}

.no-messages {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

/* ========== SPONSORSHIP & FIABILIT� ========== */

.sponsorship-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px 0;
}

.reliability-section,
.sponsor-section,
.history-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.history-section {
  grid-column: span 2;
}

.reliability-section h3,
.sponsor-section h3,
.history-section h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.reliability-display {
  text-align: center;
  margin-bottom: 24px;
}

.reliability-circle {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.score-value {
  font-size: 3rem;
  font-weight: 700;
}

.score-value.excellent { color: var(--success); }
.score-value.good { color: #22c55e; }
.score-value.average { color: var(--warning); }
.score-value.low { color: #f97316; }
.score-value.poor { color: var(--danger); }

.score-label {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.reliability-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-fill.excellent { background: var(--success); }
.progress-fill.good { background: #22c55e; }
.progress-fill.average { background: var(--warning); }
.progress-fill.low { background: #f97316; }
.progress-fill.poor { background: var(--danger); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.sponsor-code-section {
  margin-bottom: 20px;
}

.sponsor-code-section h4 {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.sponsor-code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sponsor-code {
  background: var(--bg-elevated);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: var(--accent-light);
}

.sponsor-info {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-action {
  font-weight: 500;
}

.history-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-points {
  font-weight: 700;
  font-size: 1.1rem;
}

.history-points.positive {
  color: var(--success);
}

.history-points.negative {
  color: var(--danger);
}

.actions-summary {
  margin-top: 20px;
}

.actions-summary h4 {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.action-type {
  flex: 1;
}

.action-count {
  color: var(--text-muted);
}

.action-points {
  font-weight: 600;
}

.action-points.positive {
  color: var(--success);
}

.action-points.negative {
  color: var(--danger);
}

.empty-text {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

/* ========== Modales Additionnelles ========== */

.modal-content.large {
  max-width: 600px;
}

.input-row {
  display: flex;
  gap: 16px;
}

.input-row .input-group {
  flex: 1;
}

.checkbox-group {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Page Actions */
.page-actions {
  display: flex;
  gap: 10px;
}

/* Empty State Small */
.empty-state.small {
  padding: 30px;
}

.empty-state.small .empty-icon {
  font-size: 2rem;
}

/* Note: Responsive styles moved to end of file */

/* ========== AVATAR & BIO ========== */

.profile-avatar.has-image,
.avatar-preview.has-image {
  padding: 0;
  overflow: hidden;
}

.profile-avatar img,
.profile-avatar-img,
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.profile-bio {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.profile-bio h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.profile-bio p {
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
}

.avatar-upload-group {
  margin-bottom: 16px;
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  border: 2px solid var(--border);
}

#edit-bio {
  width: 100%;
  resize: vertical;
  min-height: 80px;
}

/* User Profile View Modal */
.user-profile-view {
  padding: 20px 0;
}

.user-profile-view .profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.user-profile-view .profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

/* Sidebar avatar avec image */
#user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Carte utilisateur avec score */
.user-marker-popup {
  min-width: 200px;
}

.user-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-popup-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  overflow: hidden;
}

.user-popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-popup-info h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.user-popup-score {
  font-size: 0.85rem;
  color: var(--warning);
}

.user-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ========== PUBLIC MAP ========== */

#public-map-screen {
  flex-direction: column;
}

#public-map-screen.active {
  display: flex;
}

.public-map-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  width: 100%;
  background: var(--bg-primary);
}

.public-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.public-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.public-logo span {
  font-size: 1.5rem;
}

.public-logo h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.public-actions {
  display: flex;
  gap: 12px;
}

.public-map-info {
  padding: 12px 24px;
  background: var(--bg-elevated);
  text-align: center;
  flex-shrink: 0;
}

.public-map-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Wrapper pour forcer la hauteur */
.public-map-wrapper {
  flex: 1;
  position: relative;
  min-height: 300px;
  width: 100%;
}

#public-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== VALIDATION SYSTEM ========== */

/* Badges de validation */
.validation-badge,
.validation-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.validation-badge.pending,
.validation-status.pending {
  background: rgba(107, 114, 128, 0.2);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.validation-badge.validated,
.validation-status.validated {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* User card validation status */
.user-card.pending {
  border-left: 3px solid #6B7280;
}

.user-card.validated {
  border-left: 3px solid #10B981;
}

/* Avatar with validation ring */
.user-avatar.pending {
  box-shadow: 0 0 0 3px #6B7280;
}

.user-avatar.validated {
  box-shadow: 0 0 0 3px #10B981;
}

/* Popup validation */
.user-popup.pending {
  border-left: 3px solid #6B7280;
}

/* Bouton valider */
.popup-btn.validate,
.btn-success {
  background: #10B981 !important;
  color: white !important;
  border: none;
}

.popup-btn.validate:hover,
.btn-success:hover {
  background: #059669 !important;
}

/* Légende carte */
.map-legend-validation {
  display: flex;
  gap: 16px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-top: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.validated {
  background: #10B981;
}

.legend-dot.pending {
  background: #6B7280;
}

.legend-dot.flagged {
  background: #EF4444;
}

/* ========== RESPONSIVE AMÉLIORATIONS ========== */

/* === PROFIL RESPONSIVE === */

.profile-card {
  width: 100%;
  max-width: 600px;
}

.profile-header {
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.profile-info {
  width: 100%;
  padding: 16px 0 0;
  border-top: none;
}

.profile-stats {
  padding: 16px;
}

.stat-item, .stat-card {
  padding: 12px 8px;
}

.stat-value {
  font-size: 1.25rem;
}

/* User Profile View amélioré */
.user-profile-view .profile-header {
  flex-direction: column;
  text-align: center;
}

.user-profile-view .profile-avatar {
  width: 120px;
  height: 120px;
  font-size: 3rem;
  margin-bottom: 8px;
}

.profile-bio,
.profile-languages {
  margin: 0 16px 16px;
}

/* === MAISONS RESPONSIVE === */

.houses-tabs {
  flex-wrap: wrap;
  padding: 12px 16px;
  gap: 6px;
}

.houses-tab {
  padding: 8px 14px;
  font-size: 0.85rem;
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.houses-grid {
  padding: 16px;
  gap: 16px;
}

.house-card {
  padding: 16px;
}

.house-header {
  flex-wrap: wrap;
}

.house-actions {
  flex-wrap: wrap;
}

.house-actions .btn {
  min-width: 100px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* Members list amélioré */
.member-item,
.request-item {
  flex-wrap: wrap;
  gap: 10px;
}

.request-actions {
  width: 100%;
  justify-content: flex-end;
  margin-top: 8px;
}

.invite-code-box {
  flex-wrap: wrap;
  justify-content: center;
}

.invite-code-box code {
  font-size: 1rem;
  padding: 10px 20px;
}

/* === MESSAGERIE RESPONSIVE === */

.messages-layout {
  min-height: 400px;
}

.conversations-sidebar {
  min-width: 280px;
}

.conv-avatar {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.conversation-item {
  padding: 12px 14px;
}

.chat-header {
  padding: 12px 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-header-info {
  flex: 1;
  min-width: 150px;
}

.messages-container {
  padding: 16px;
  gap: 10px;
}

.message {
  max-width: 85%;
}

.message-bubble {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.message-input-area {
  padding: 12px 16px;
  gap: 10px;
}

/* Mobile menu toggle pour messagerie */
.mobile-back-btn {
  display: none;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
}

/* === MEDIA QUERIES RESPONSIVE === */

@media (max-width: 768px) {
  /* Profils */
  .profile-card {
    border-radius: var(--radius-md);
    margin: 8px;
  }
  
  .profile-header {
    padding: 20px 12px;
    gap: 12px;
  }
  
  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  
  .profile-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
  }
  
  .stat-item, .stat-card {
    padding: 10px 6px;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .profile-actions {
    padding: 16px;
    flex-direction: column;
  }
  
  .profile-actions .btn {
    width: 100%;
  }
  
  .info-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }
  
  .info-label {
    font-size: 0.8rem;
  }
  
  /* User profile view */
  .user-profile-view .profile-avatar {
    width: 90px;
    height: 90px;
    font-size: 2.5rem;
  }
  
  .profile-bio,
  .profile-languages {
    margin: 0 12px 12px;
    padding: 12px;
  }
  
  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  /* Maisons */
  .houses-tabs {
    padding: 10px 12px;
    gap: 4px;
  }
  
  .houses-tab {
    padding: 8px 10px;
    font-size: 0.8rem;
    min-width: 80px;
  }
  
  .houses-grid {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }
  
  .house-card {
    padding: 14px;
  }
  
  .house-name {
    font-size: 1rem;
  }
  
  .house-description {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  
  .house-actions {
    flex-direction: column;
  }
  
  .house-actions .btn {
    width: 100%;
    font-size: 0.9rem;
  }
  
  .member-item,
  .request-item {
    padding: 10px;
  }
  
  .member-avatar {
    width: 36px;
    height: 36px;
  }
  
  /* Messagerie */
  .messages-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--titlebar-height) - 100px);
  }
  
  .conversations-sidebar {
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .conversations-sidebar.hidden-mobile {
    display: none;
  }
  
  .chat-area.hidden-mobile {
    display: none;
  }
  
  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .conversations-list {
    max-height: 250px;
    overflow-y: auto;
  }
  
  .conversation-item {
    padding: 10px 12px;
  }
  
  .conv-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
  
  .conv-name {
    font-size: 0.9rem;
  }
  
  .conv-preview {
    font-size: 0.8rem;
  }
  
  .chat-area {
    flex: 1;
    min-height: 350px;
  }
  
  .chat-header {
    padding: 10px 12px;
  }
  
  .chat-header-avatar {
    width: 36px;
    height: 36px;
  }
  
  .messages-container {
    padding: 12px;
    min-height: 200px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .message-bubble {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .message-input-area {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .message-input-area textarea {
    padding: 8px 12px;
    min-height: 40px;
    font-size: 0.85rem;
  }
  
  .message-input-area .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  /* Modal - Boutons responsifs */
  .modal-footer {
    gap: 6px;
    padding: 12px 16px;
  }

  .modal-footer .btn-sm {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 12px 16px;
  }

  /* Profils très petits écrans */
  .profile-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .profile-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
  
  .languages-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Maisons */
  .houses-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .houses-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .houses-tab {
    flex-shrink: 0;
    min-width: 90px;
  }
  
  .house-icon {
    font-size: 1.5rem;
  }
  
  /* Messagerie */
  .conversations-list {
    max-height: 200px;
  }
  
  .conv-preview {
    display: none;
  }
  
  .message {
    max-width: 95%;
  }
}

/* === AMÉLIORATIONS VISUELLES === */

/* Profil - effet glass */
.profile-card {
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Maisons - hover effects */
.house-card {
  position: relative;
  overflow: hidden;
}

.house-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.house-card:hover::before {
  transform: scaleX(1);
}

/* Messagerie - animations */
.message-bubble {
  animation: messageIn 0.2s ease-out;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Conversation hover amélioré */
.conversation-item {
  position: relative;
}

.conversation-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.conversation-item:hover::after,
.conversation-item.active::after {
  transform: scaleY(1);
}

/* Avatar images uniformes */
.conv-avatar img,
.member-avatar img,
.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Focus styles améliorés */
.conv-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ========== LANGUAGE SELECTOR ========== */

.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.lang-icon {
  font-size: 1.1rem;
}

.lang-select {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-select:hover {
  border-color: var(--accent);
}

.lang-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.lang-select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px;
}

/* Auth screen language selector */
.auth-lang-selector {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.auth-lang-selector .lang-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 4px 8px;
}

.auth-lang-selector .lang-select:focus {
  box-shadow: none;
}

@media (max-width: 768px) {
  .lang-selector {
    padding: 6px 10px;
  }
  
  .lang-select {
    font-size: 0.8rem;
    padding: 5px 8px;
  }
  
  .auth-lang-selector {
    top: 10px;
    right: 10px;
  }
}

/* ========== DOWNLOAD PAGE ========== */
.download-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.download-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow);
}

.download-card.coming-soon {
  opacity: 0.6;
}

.download-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.download-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: grayscale(0);
}

.download-card.coming-soon .download-icon {
  filter: grayscale(0.5);
}

.download-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.download-card > p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.download-features {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.download-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.download-features li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.download-actions .btn-large {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.download-version {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.download-info {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.download-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.download-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .download-layout {
    grid-template-columns: 1fr;
  }
  
  .download-card {
    padding: 1.5rem;
  }
  
  .download-icon {
    font-size: 3rem;
  }
}

/* ========== Amélioration Modales Maisons ========== */

/* Modales agrandies */
.modal-content.modal-large {
  max-width: 600px;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  justify-content: space-between;
  align-items: center;
}

.modal-footer .btn {
  display: flex !important;
  flex: 1 1 auto;
  min-width: 120px;
  padding: 11px 16px;
  font-size: 0.9rem;
  justify-content: center;
}

/* Sections dans les modales */
.section-divider {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 20px 0 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Champs pour maisons publiques */
.public-house-fields {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.public-house-fields .input-group {
  margin-bottom: 16px;
}

/* ========== MATCHES TABS ========== */

.matches-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.matches-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.matches-tab:hover {
  color: var(--text-primary);
}

.matches-tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.matches-content {
  position: relative;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  margin-top: 12px;
}

.help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

/* Amélioration des cartes de maisons publiques */
.house-card.public-house {
  position: relative;
  overflow: hidden;
}

/* Affichage de la ville et distance */
.house-city {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 8px;
}

.house-distance {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-right: 8px;
}

.house-location-info {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

/* ========== MODAL ÉDITION MAISON ========== */
#edit-house-modal .modal-content {
  max-width: 500px;
}

#edit-house-modal .modal-body {
  padding: 24px;
}

#edit-house-modal .form-group {
  margin-bottom: 20px;
}

#edit-house-modal .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* Hide mobile-only navigation on desktop */
.bottom-nav,
.bottom-menu {
  display: none;
}

/* Matches Lists - Hide inactive tabs */
.matches-content .matches-list {
  display: none;
  flex-direction: column;
}

.matches-content .matches-list.active {
  display: flex;
}

/* Back button - hidden on desktop only */
@media (min-width: 481px) {
  .btn-back-mobile {
    display: none !important;
  }
}
