/* Style épuré, sobre et professionnel pour RideLink */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #090b0e;
  --surface: #12151b;
  --surface-hover: #181d25;
  --surface-active: #202632;
  --border: #222731;
  --border-focus: #3b82f6;
  --text: #f1f3f5;
  --text-muted: #8b949e;
  --text-dim: #545d68;
  
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #090b0e;
  
  --btn-secondary-bg: #1c212a;
  --btn-secondary-text: #e1e4e8;
  --btn-secondary-border: #2a313d;
  
  --danger-bg: #221214;
  --danger-text: #f87171;
  --danger-border: #3d1c1f;

  --online: #10b981;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 13.5px;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ICONS (Lucide) */
.lucide, i[data-lucide] {
  width: 15px;
  height: 15px;
  stroke-width: 1.8px;
  vertical-align: middle;
  display: inline-block;
}

.icon-lg {
  width: 18px;
  height: 18px;
}

.icon-sm {
  width: 13px;
  height: 13px;
}

/* NAVBAR */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.dot.online {
  background: var(--online);
}

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.2rem;
  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ÉTAPES */
.step-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.device-badge {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-left: auto;
  font-weight: 500;
}

/* FORMULAIRES */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus, select:focus {
  border-color: var(--border-focus);
}

/* BOUTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background: #e2e4e8;
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: #3b4453;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: #31181b;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 11.5px;
}

.btn-lg {
  padding: 0.75rem 1rem;
  font-size: 13.5px;
}

/* LISTE DES SALONS */
.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.room-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.room-title {
  font-weight: 600;
  font-size: 13.5px;
}

.room-slug {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.room-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 11.5px;
}

.info-label {
  color: var(--text-dim);
  font-size: 10.5px;
}

.info-val {
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

.room-actions {
  display: flex;
  gap: 0.5rem;
}

/* ONBOARDING MOTARD */
.join-box {
  max-width: 440px;
  margin: 1.5rem auto;
}

.join-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.join-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

.join-header p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.field-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.stores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.store-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.65rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.store-card:hover {
  background: var(--surface-hover);
}

/* TIPS */
.tips-list {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* MODAL & TOAST */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 0.15s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 380px;
  width: 100%;
}

#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #ffffff;
  color: #090b0e;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 580px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .room-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}
