*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#app { width: 100%; max-width: 420px; }

.hidden { display: none !important; }

.state { width: 100%; }

/* Spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #0078d4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state.loading-state { text-align: center; color: #666; padding: 40px; }

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.avatar.small {
  width: 36px; height: 36px;
  font-size: 16px;
  background: #e8f0fe;
  color: #0078d4;
}

.name { font-size: 18px; font-weight: 600; line-height: 1.3; }
.subtitle { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.company { opacity: 1; font-weight: 500; }

.card-body { padding: 16px 20px; }

.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}
.field:last-child { border-bottom: none; }

.label { font-size: 12px; color: #888; flex-shrink: 0; }
.value { font-size: 14px; color: #1a1a1a; text-align: right; }
.link { color: #0078d4; text-decoration: none; }
.link:hover { text-decoration: underline; }

.phone-badge {
  background: #e8f0fe;
  color: #0050a0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.card-footer {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

/* Buttons */
.btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: #0078d4; color: #fff; }
.btn-secondary { background: #f0f0f0; color: #333; }

/* Multi-résultats */
.multi-header { padding: 20px; border-bottom: 1px solid #f0f0f0; }
.multi-header h2 { font-size: 16px; font-weight: 600; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.12s;
}
.list-item:hover { background: #f8f9ff; }
.list-item-info { flex: 1; }
.list-item-info .name { display: block; font-size: 15px; font-weight: 500; }
.list-item-info .subtitle { display: block; font-size: 12px; color: #888; }
.chevron { color: #bbb; font-size: 20px; }

/* Inconnu */
.card.unknown { text-align: center; padding: 40px 24px; }
.unknown-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #fff3cd;
  color: #856404;
  font-size: 28px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.card.unknown h2 { font-size: 18px; margin-bottom: 8px; }
.hint { color: #888; font-size: 13px; margin: 8px 0 20px; }

/* Erreur */
.card.error { padding: 32px; text-align: center; color: #c0392b; }